home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: Mailbox/MIME Entity
(archive/mbox).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| Mailbox/MIME Entity (archive/mbox)
| magic
| Supported |
100%
| dexvert
| Internet Message Format (text/imf)
| magic
| Supported |
1%
| dexvert
| WANG Integrated Word Processor (document/wangIWP)
| ext
| Unsupported |
1%
| dexvert
| Dynamic Publisher Document (document/dynamicPublisherDocument)
| ext
| Unsupported |
1%
| dexvert
| Excellence! Document (document/excellenceDocument)
| ext
| Unsupported |
1%
| dexvert
| Norton Textra Writer (document/textraWriter)
| ext
| Unsupported |
1%
| dexvert
| IBM DisplayWrite Document (document/ibmDisplayWriteDocument)
| ext
| Unsupported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| Mailbox text, 1st line "From sce!mitel!uunet!tut.cis.ohio-state.edu!ucbvax!hplabs!hplabsz!mayer Thu Jan 11 12:51:21 EST 1990", ASCII text
| default
| |
100%
| TrID
| E-Mail message (Var. 2)
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
| |
100%
| xdgMime
| application/mbox
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 46 72 6f 6d 20 73 63 65 | 21 6d 69 74 65 6c 21 75 |From sce|!mitel!u|
|00000010| 75 6e 65 74 21 74 75 74 | 2e 63 69 73 2e 6f 68 69 |unet!tut|.cis.ohi|
|00000020| 6f 2d 73 74 61 74 65 2e | 65 64 75 21 75 63 62 76 |o-state.|edu!ucbv|
|00000030| 61 78 21 68 70 6c 61 62 | 73 21 68 70 6c 61 62 73 |ax!hplab|s!hplabs|
|00000040| 7a 21 6d 61 79 65 72 20 | 54 68 75 20 4a 61 6e 20 |z!mayer |Thu Jan |
|00000050| 31 31 20 31 32 3a 35 31 | 3a 32 31 20 45 53 54 20 |11 12:51|:21 EST |
|00000060| 31 39 39 30 0a 41 72 74 | 69 63 6c 65 3a 20 32 32 |1990.Art|icle: 22|
|00000070| 33 34 20 6f 66 20 63 6f | 6d 70 2e 6c 61 6e 67 2e |34 of co|mp.lang.|
|00000080| 6c 69 73 70 0a 50 61 74 | 68 3a 20 63 6f 67 6e 6f |lisp.Pat|h: cogno|
|00000090| 73 21 73 63 65 21 6d 69 | 74 65 6c 21 75 75 6e 65 |s!sce!mi|tel!uune|
|000000a0| 74 21 74 75 74 2e 63 69 | 73 2e 6f 68 69 6f 2d 73 |t!tut.ci|s.ohio-s|
|000000b0| 74 61 74 65 2e 65 64 75 | 21 75 63 62 76 61 78 21 |tate.edu|!ucbvax!|
|000000c0| 68 70 6c 61 62 73 21 68 | 70 6c 61 62 73 7a 21 6d |hplabs!h|plabsz!m|
|000000d0| 61 79 65 72 0a 46 72 6f | 6d 3a 20 6d 61 79 65 72 |ayer.Fro|m: mayer|
|000000e0| 40 68 70 6c 61 62 73 7a | 2e 48 50 4c 2e 48 50 2e |@hplabsz|.HPL.HP.|
|000000f0| 43 4f 4d 20 28 4e 69 65 | 6c 73 20 4d 61 79 65 72 |COM (Nie|ls Mayer|
|00000100| 29 0a 4e 65 77 73 67 72 | 6f 75 70 73 3a 20 63 6f |).Newsgr|oups: co|
|00000110| 6d 70 2e 6c 61 6e 67 2e | 6c 69 73 70 0a 53 75 62 |mp.lang.|lisp.Sub|
|00000120| 6a 65 63 74 3a 20 52 65 | 3a 20 58 4c 49 53 50 20 |ject: Re|: XLISP |
|00000130| 4f 62 6a 65 63 74 20 4d | 65 74 68 6f 64 20 53 65 |Object M|ethod Se|
|00000140| 6c 65 63 74 6f 72 73 20 | 3a 6e 65 77 20 61 6e 64 |lectors |:new and|
|00000150| 20 3a 69 73 6e 65 77 2e | 0a 4d 65 73 73 61 67 65 | :isnew.|.Message|
|00000160| 2d 49 44 3a 20 3c 34 36 | 31 33 40 68 70 6c 61 62 |-ID: <46|13@hplab|
|00000170| 73 7a 2e 48 50 4c 2e 48 | 50 2e 43 4f 4d 3e 0a 44 |sz.HPL.H|P.COM>.D|
|00000180| 61 74 65 3a 20 31 30 20 | 4a 61 6e 20 39 30 20 30 |ate: 10 |Jan 90 0|
|00000190| 37 3a 32 36 3a 32 36 20 | 47 4d 54 0a 52 65 66 65 |7:26:26 |GMT.Refe|
|000001a0| 72 65 6e 63 65 73 3a 20 | 3c 31 35 31 31 40 64 69 |rences: |<1511@di|
|000001b0| 6e 6c 2e 6d 6d 63 2e 55 | 55 43 50 3e 0a 52 65 70 |nl.mmc.U|UCP>.Rep|
|000001c0| 6c 79 2d 54 6f 3a 20 6d | 61 79 65 72 40 68 70 6c |ly-To: m|ayer@hpl|
|000001d0| 61 62 73 2e 68 70 2e 63 | 6f 6d 20 28 4e 69 65 6c |abs.hp.c|om (Niel|
|000001e0| 73 20 4d 61 79 65 72 29 | 0a 4f 72 67 61 6e 69 7a |s Mayer)|.Organiz|
|000001f0| 61 74 69 6f 6e 3a 20 48 | 65 77 6c 65 74 74 2d 50 |ation: H|ewlett-P|
|00000200| 61 63 6b 61 72 64 20 4c | 61 62 73 2c 20 53 6f 66 |ackard L|abs, Sof|
|00000210| 74 77 61 72 65 20 54 65 | 63 68 6e 6f 6c 6f 67 79 |tware Te|chnology|
|00000220| 20 4c 61 62 2c 20 50 61 | 6c 6f 20 41 6c 74 6f 2c | Lab, Pa|lo Alto,|
|00000230| 20 43 41 2e 0a 4c 69 6e | 65 73 3a 20 33 30 38 0a | CA..Lin|es: 308.|
|00000240| 53 75 6d 6d 61 72 79 3a | 0a 45 78 70 69 72 65 73 |Summary:|.Expires|
|00000250| 3a 0a 53 65 6e 64 65 72 | 3a 0a 46 6f 6c 6c 6f 77 |:.Sender|:.Follow|
|00000260| 75 70 2d 54 6f 3a 0a 0a | 49 6e 20 61 72 74 69 63 |up-To:..|In artic|
|00000270| 6c 65 20 3c 31 35 31 31 | 40 64 69 6e 6c 2e 6d 6d |le <1511|@dinl.mm|
|00000280| 63 2e 55 55 43 50 3e 20 | 6e 6f 72 65 6e 40 64 69 |c.UUCP> |noren@di|
|00000290| 6e 6c 2e 55 55 43 50 20 | 28 43 68 61 72 6c 65 73 |nl.UUCP |(Charles|
|000002a0| 20 4e 6f 72 65 6e 29 20 | 77 72 69 74 65 73 3a 0a | Noren) |writes:.|
|000002b0| 3e 49 74 27 73 20 62 65 | 65 6e 20 61 20 77 68 69 |>It's be|en a whi|
|000002c0| 6c 65 20 73 69 6e 63 65 | 20 49 27 76 65 20 62 65 |le since| I've be|
|000002d0| 65 6e 20 6f 6e 20 74 68 | 65 20 6e 65 74 2e 20 20 |en on th|e net. |
|000002e0| 49 20 63 61 6e 20 6e 6f | 20 6c 6f 6e 67 65 72 0a |I can no| longer.|
|000002f0| 3e 61 63 63 65 73 73 20 | 63 6f 6d 70 2e 6c 61 6e |>access |comp.lan|
|00000300| 67 2e 6c 69 73 70 2e 78 | 20 66 72 6f 6d 20 6f 75 |g.lisp.x| from ou|
|00000310| 72 20 73 69 74 65 2c 20 | 49 20 73 75 70 70 6f 73 |r site, |I suppos|
|00000320| 65 20 69 74 20 77 65 6e | 74 20 61 77 61 79 3f 0a |e it wen|t away?.|
|00000330| 0a 69 74 27 73 20 73 74 | 69 6c 6c 20 74 68 65 72 |.it's st|ill ther|
|00000340| 65 2e 2e 2e 0a 0a 3e 49 | 27 76 65 20 6a 75 73 74 |e.....>I|'ve just|
|00000350| 20 73 74 61 72 74 69 6e | 67 20 70 6c 61 79 69 6e | startin|g playin|
|00000360| 67 20 77 69 74 68 20 58 | 4c 49 53 50 20 76 32 2e |g with X|LISP v2.|
|00000370| 30 2c 20 70 61 72 74 69 | 63 75 6c 61 72 6c 79 20 |0, parti|cularly |
|00000380| 74 68 65 0a 3e 6f 62 6a | 65 63 74 2d 6f 72 69 65 |the.>obj|ect-orie|
|00000390| 6e 74 65 64 20 66 65 61 | 74 75 72 65 73 20 6f 66 |nted fea|tures of|
|000003a0| 20 69 74 2e 20 20 49 27 | 76 65 20 63 72 65 61 74 | it. I'|ve creat|
|000003b0| 65 64 20 6e 65 77 20 63 | 6c 61 73 73 65 73 20 77 |ed new c|lasses w|
|000003c0| 69 74 68 0a 3e 69 6e 73 | 74 61 6e 63 65 20 61 6e |ith.>ins|tance an|
|000003d0| 64 20 63 6c 61 73 73 20 | 76 61 72 69 61 62 6c 65 |d class |variable|
|000003e0| 73 2c 20 61 6e 64 20 49 | 27 76 65 20 75 73 65 64 |s, and I|'ve used|
|000003f0| 20 74 68 65 20 3a 6e 65 | 77 20 73 65 6c 65 63 74 | the :ne|w select|
|00000400| 6f 72 0a 3e 74 6f 20 64 | 6f 20 73 6f 20 61 6e 64 |or.>to d|o so and|
|00000410| 20 69 74 20 77 6f 72 6b | 73 20 6a 75 73 74 20 66 | it work|s just f|
|00000420| 69 6e 65 2e 20 20 48 6f | 77 65 76 65 72 2c 20 49 |ine. Ho|wever, I|
|00000430| 20 73 65 65 20 74 68 65 | 20 3a 69 73 6e 65 77 0a | see the| :isnew.|
|00000440| 3e 73 65 6c 65 63 74 6f | 72 20 69 6e 20 74 68 65 |>selecto|r in the|
|00000450| 20 64 6f 63 75 6d 65 6e | 74 61 74 69 6f 6e 20 61 | documen|tation a|
|00000460| 6e 64 20 49 20 77 61 73 | 20 77 6f 6e 64 65 72 69 |nd I was| wonderi|
|00000470| 6e 67 20 68 6f 77 20 74 | 68 61 74 20 77 6f 72 6b |ng how t|hat work|
|00000480| 73 0a 3e 63 6f 6d 70 61 | 72 65 64 20 74 6f 20 3a |s.>compa|red to :|
|00000490| 6e 65 77 2e 0a 0a 57 68 | 65 6e 20 49 20 66 69 72 |new...Wh|en I fir|
|000004a0| 73 74 20 6c 6f 6f 6b 65 | 64 20 61 74 20 58 4c 49 |st looke|d at XLI|
|000004b0| 53 50 2c 20 49 20 74 6f | 6f 20 66 6f 75 6e 64 20 |SP, I to|o found |
|000004c0| 74 68 65 20 64 6f 63 75 | 6d 65 6e 74 61 74 69 6f |the docu|mentatio|
|000004d0| 6e 20 6f 6e 20 74 68 65 | 0a 6f 62 6a 65 63 74 20 |n on the|.object |
|000004e0| 73 79 73 74 65 6d 20 74 | 6f 20 62 65 20 61 20 6c |system t|o be a l|
|000004f0| 69 74 74 6c 65 20 74 65 | 72 73 65 2e 20 45 76 65 |ittle te|rse. Eve|
|00000500| 72 79 74 68 69 6e 67 20 | 62 65 63 6f 6d 65 73 20 |rything |becomes |
|00000510| 6d 75 63 68 20 63 6c 65 | 61 72 65 72 0a 6f 6e 63 |much cle|arer.onc|
|00000520| 65 20 79 6f 75 20 73 65 | 65 20 73 6f 6d 65 20 65 |e you se|e some e|
|00000530| 78 61 6d 70 6c 65 73 2e | 20 0a 0a 49 20 72 65 63 |xamples.| ..I rec|
|00000540| 65 6e 74 6c 79 20 77 72 | 6f 74 65 20 75 70 20 73 |ently wr|ote up s|
|00000550| 6f 6d 65 20 64 6f 63 75 | 6d 65 6e 74 61 74 69 6f |ome docu|mentatio|
|00000560| 6e 20 6f 6e 20 58 4c 49 | 53 50 27 73 20 6f 62 6a |n on XLI|SP's obj|
|00000570| 65 63 74 20 73 79 73 74 | 65 6d 20 66 6f 72 0a 75 |ect syst|em for.u|
|00000580| 73 65 20 77 69 74 68 20 | 57 49 4e 54 45 52 50 20 |se with |WINTERP |
|00000590| 28 61 6e 20 58 4c 49 53 | 50 2d 62 61 73 65 64 20 |(an XLIS|P-based |
|000005a0| 72 61 70 69 64 20 70 72 | 6f 74 6f 74 79 70 69 6e |rapid pr|ototypin|
|000005b0| 67 20 65 6e 76 69 72 6f | 6e 6d 65 6e 74 20 66 6f |g enviro|nment fo|
|000005c0| 72 0a 61 70 70 6c 69 63 | 61 74 69 6f 6e 73 20 62 |r.applic|ations b|
|000005d0| 61 73 65 64 20 6f 6e 20 | 74 68 65 20 4f 53 46 20 |ased on |the OSF |
|000005e0| 4d 6f 74 69 66 20 77 69 | 64 67 65 74 73 29 2e 20 |Motif wi|dgets). |
|000005f0| 54 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 65 78 |The foll|owing ex|
|00000600| 63 65 72 70 74 0a 66 72 | 6f 6d 20 77 69 6e 74 65 |cerpt.fr|om winte|
|00000610| 72 70 2f 64 6f 63 2f 77 | 69 6e 74 65 72 70 2e 64 |rp/doc/w|interp.d|
|00000620| 6f 63 20 6d 61 79 20 68 | 65 6c 70 20 28 67 65 74 |oc may h|elp (get|
|00000630| 20 77 69 6e 74 65 72 70 | 20 76 69 61 20 61 6e 6f | winterp| via ano|
|00000640| 6e 79 6d 6f 75 73 20 66 | 74 70 0a 66 72 6f 6d 20 |nymous f|tp.from |
|00000650| 65 78 70 6f 2e 6c 63 73 | 2e 6d 69 74 2e 65 64 75 |expo.lcs|.mit.edu|
|00000660| 3a 6f 6c 64 63 6f 6e 74 | 72 69 62 2f 77 69 6e 74 |:oldcont|rib/wint|
|00000670| 65 72 70 2e 74 61 72 2e | 5a 29 2e 20 49 6e 20 70 |erp.tar.|Z). In p|
|00000680| 61 72 74 69 63 75 6c 61 | 72 2c 20 79 6f 75 72 0a |articula|r, your.|
|00000690| 71 75 65 73 74 69 6f 6e | 20 61 62 6f 75 74 20 3a |question| about :|
|000006a0| 49 53 4e 45 57 20 69 73 | 20 61 6e 73 77 65 72 65 |ISNEW is| answere|
|000006b0| 64 20 69 6e 20 74 68 65 | 20 22 6f 62 6a 65 63 74 |d in the| "object|
|000006c0| 20 69 6e 69 74 69 61 6c | 69 7a 61 74 69 6f 6e 22 | initial|ization"|
|000006d0| 0a 73 65 63 74 69 6f 6e | 2e 20 0a 0a 09 09 09 2d |.section|. .....-|
|000006e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000006f0| 2d 2d 2d 0a 0a 2a 20 49 | 6e 74 72 6f 64 75 63 74 |---..* I|ntroduct|
|00000700| 69 6f 6e 20 74 6f 20 58 | 4c 49 53 50 20 6f 62 6a |ion to X|LISP obj|
|00000710| 65 63 74 73 20 61 6e 64 | 20 57 69 64 67 65 74 73 |ects and| Widgets|
|00000720| 2e 0a 0a 57 49 4e 54 45 | 52 50 20 75 73 65 73 20 |...WINTE|RP uses |
|00000730| 58 4c 49 53 50 27 73 20 | 6f 62 6a 65 63 74 20 73 |XLISP's |object s|
|00000740| 79 73 74 65 6d 20 61 73 | 20 69 74 73 20 69 6e 74 |ystem as| its int|
|00000750| 65 72 66 61 63 65 20 74 | 6f 20 74 68 65 20 63 6c |erface t|o the cl|
|00000760| 61 73 73 20 68 69 65 72 | 61 72 63 68 79 0a 6f 66 |ass hier|archy.of|
|00000770| 20 77 69 64 67 65 74 73 | 20 70 72 6f 76 69 64 65 | widgets| provide|
|00000780| 64 20 62 79 20 4d 6f 74 | 69 66 2e 20 53 70 65 63 |d by Mot|if. Spec|
|00000790| 69 66 69 63 61 6c 6c 79 | 2c 20 65 61 63 68 20 4d |ifically|, each M|
|000007a0| 6f 74 69 66 20 77 69 64 | 67 65 74 20 63 6c 61 73 |otif wid|get clas|
|000007b0| 73 20 69 73 0a 72 65 70 | 72 65 73 65 6e 74 65 64 |s is.rep|resented|
|000007c0| 20 62 79 20 6f 6e 65 20 | 6f 72 20 6d 6f 72 65 20 | by one |or more |
|000007d0| 6f 62 6a 65 63 74 20 63 | 6c 61 73 73 65 73 20 69 |object c|lasses i|
|000007e0| 6e 20 57 49 4e 54 45 52 | 50 2e 20 20 49 6e 20 6f |n WINTER|P. In o|
|000007f0| 72 64 65 72 20 74 6f 20 | 62 65 73 74 0a 75 6e 64 |rder to |best.und|
|00000800| 65 72 73 74 61 6e 64 20 | 74 68 65 20 63 61 70 61 |erstand |the capa|
|00000810| 62 69 6c 69 74 69 65 73 | 20 6f 66 20 57 49 4e 54 |bilities| of WINT|
|00000820| 45 52 50 27 73 20 4d 6f | 74 69 66 20 69 6e 74 65 |ERP's Mo|tif inte|
|00000830| 72 66 61 63 65 2c 20 61 | 20 62 72 69 65 66 20 72 |rface, a| brief r|
|00000840| 65 76 69 65 77 20 6f 66 | 0a 74 68 65 20 58 4c 49 |eview of|.the XLI|
|00000850| 53 50 20 6f 62 6a 65 63 | 74 20 73 79 73 74 65 6d |SP objec|t system|
|00000860| 20 69 73 20 69 6e 20 6f | 72 64 65 72 2e 20 59 6f | is in o|rder. Yo|
|00000870| 75 20 6d 61 79 20 61 6c | 73 6f 20 77 61 6e 74 20 |u may al|so want |
|00000880| 74 6f 20 63 6f 6e 73 75 | 6c 74 20 74 68 65 20 58 |to consu|lt the X|
|00000890| 4c 49 53 50 0a 64 6f 63 | 75 6d 65 6e 74 61 74 69 |LISP.doc|umentati|
|000008a0| 6f 6e 20 2e 2f 77 69 6e | 74 65 72 70 2f 64 6f 63 |on ./win|terp/doc|
|000008b0| 2f 78 4c 69 73 70 2e 64 | 6f 63 20 66 6f 72 20 61 |/xLisp.d|oc for a|
|000008c0| 20 6d 6f 72 65 20 70 72 | 65 63 69 73 65 20 64 65 | more pr|ecise de|
|000008d0| 66 69 6e 69 74 69 6f 6e | 20 6f 66 20 74 68 65 0a |finition| of the.|
|000008e0| 6f 62 6a 65 63 74 20 73 | 79 73 74 65 6d 2e 0a 0a |object s|ystem...|
|000008f0| 58 4c 49 53 50 20 43 6c | 61 73 73 65 73 20 64 65 |XLISP Cl|asses de|
|00000900| 73 63 72 69 62 65 20 74 | 68 65 20 74 79 70 65 20 |scribe t|he type |
|00000910| 6f 66 20 61 20 70 61 72 | 74 69 63 75 6c 61 72 20 |of a par|ticular |
|00000920| 6f 62 6a 65 63 74 20 62 | 79 20 64 65 63 6c 61 72 |object b|y declar|
|00000930| 69 6e 67 20 61 20 73 65 | 74 0a 6f 66 20 76 61 72 |ing a se|t.of var|
|00000940| 69 61 62 6c 65 73 20 68 | 65 6c 64 20 69 6e 20 65 |iables h|eld in e|
|00000950| 61 63 68 20 6f 62 6a 65 | 63 74 2e 20 54 68 65 73 |ach obje|ct. Thes|
|00000960| 65 20 22 69 6e 73 74 61 | 6e 63 65 20 76 61 72 69 |e "insta|nce vari|
|00000970| 61 62 6c 65 73 22 20 6d | 61 79 20 6f 6e 6c 79 20 |ables" m|ay only |
|00000980| 62 65 0a 61 63 63 65 73 | 73 65 64 20 62 79 20 22 |be.acces|sed by "|
|00000990| 6d 65 74 68 6f 64 73 22 | 20 74 68 61 74 20 72 65 |methods"| that re|
|000009a0| 73 70 6f 6e 64 20 74 6f | 20 22 6d 65 73 73 61 67 |spond to| "messag|
|000009b0| 65 73 22 20 73 65 6e 74 | 20 74 6f 20 74 68 65 20 |es" sent| to the |
|000009c0| 6f 62 6a 65 63 74 2e 0a | 4d 65 74 68 6f 64 73 20 |object..|Methods |
|000009d0| 61 72 65 20 64 65 66 69 | 6e 65 64 20 66 6f 72 20 |are defi|ned for |
|000009e0| 70 61 72 74 69 63 75 6c | 61 72 20 63 6c 61 73 73 |particul|ar class|
|000009f0| 65 73 2c 20 61 6e 64 20 | 66 75 6e 63 74 69 6f 6e |es, and |function|
|00000a00| 61 6c 69 74 79 20 6f 66 | 20 6f 74 68 65 72 0a 63 |ality of| other.c|
|00000a10| 6c 61 73 73 65 73 20 6d | 61 79 20 62 65 20 69 6e |lasses m|ay be in|
|00000a20| 63 6f 72 70 6f 72 61 74 | 65 64 20 69 6e 74 6f 20 |corporat|ed into |
|00000a30| 6e 65 77 20 63 6c 61 73 | 73 65 73 20 76 69 61 20 |new clas|ses via |
|00000a40| 22 69 6e 68 65 72 69 74 | 61 6e 63 65 22 2e 20 46 |"inherit|ance". F|
|00000a50| 72 6f 6d 0a 58 4c 49 53 | 50 2c 20 4d 6f 74 69 66 |rom.XLIS|P, Motif|
|00000a60| 20 77 69 64 67 65 74 20 | 63 6c 61 73 73 65 73 20 | widget |classes |
|00000a70| 6c 6f 6f 6b 20 6a 75 73 | 74 20 6c 69 6b 65 20 6e |look jus|t like n|
|00000a80| 6f 72 6d 61 6c 20 58 4c | 49 53 50 20 6f 62 6a 65 |ormal XL|ISP obje|
|00000a90| 63 74 73 20 2d 2d 20 74 | 68 61 74 0a 6d 65 61 6e |cts -- t|hat.mean|
|00000aa0| 73 20 74 68 61 74 20 79 | 6f 75 20 63 61 6e 20 65 |s that y|ou can e|
|00000ab0| 61 73 69 6c 79 20 65 78 | 74 65 6e 64 20 74 68 65 |asily ex|tend the|
|00000ac0| 20 66 75 6e 63 74 69 6f | 6e 61 6c 69 74 79 20 6f | functio|nality o|
|00000ad0| 66 20 4d 6f 74 69 66 20 | 77 69 64 67 65 74 73 20 |f Motif |widgets |
|00000ae0| 62 79 0a 61 64 64 69 6e | 67 20 79 6f 75 72 20 6f |by.addin|g your o|
|00000af0| 77 6e 20 6d 65 74 68 6f | 64 73 20 74 6f 20 61 20 |wn metho|ds to a |
|00000b00| 70 61 72 74 69 63 75 6c | 61 72 20 77 69 64 67 65 |particul|ar widge|
|00000b10| 74 20 63 6c 61 73 73 2e | 20 59 6f 75 20 6d 61 79 |t class.| You may|
|00000b20| 20 61 6c 73 6f 20 75 73 | 65 0a 69 6e 68 65 72 69 | also us|e.inheri|
|00000b30| 74 61 6e 63 65 20 74 6f | 20 61 74 74 61 63 68 20 |tance to| attach |
|00000b40| 79 6f 75 72 20 6f 77 6e | 20 64 61 74 61 20 73 74 |your own| data st|
|00000b50| 72 75 63 74 75 72 65 73 | 20 74 6f 20 77 69 64 67 |ructures| to widg|
|00000b60| 65 74 73 2e 20 54 68 65 | 20 72 65 73 75 6c 74 20 |ets. The| result |
|00000b70| 69 73 0a 74 68 61 74 20 | 57 49 4e 54 45 52 50 20 |is.that |WINTERP |
|00000b80| 70 72 6f 76 69 64 65 73 | 20 61 20 76 65 72 79 20 |provides| a very |
|00000b90| 63 6c 65 61 6e 20 77 61 | 79 20 74 6f 20 69 6e 74 |clean wa|y to int|
|00000ba0| 65 72 61 63 74 69 76 65 | 6c 79 20 72 61 70 69 64 |eractive|ly rapid|
|00000bb0| 2d 70 72 6f 74 6f 74 79 | 70 65 20 61 6e 0a 61 70 |-prototy|pe an.ap|
|00000bc0| 70 6c 69 63 61 74 69 6f | 6e 2c 20 77 68 69 6c 65 |plicatio|n, while|
|00000bd0| 20 61 6c 73 6f 20 70 72 | 6f 76 69 64 69 6e 67 20 | also pr|oviding |
|00000be0| 6d 65 63 68 61 6e 69 73 | 6d 73 20 66 6f 72 20 63 |mechanis|ms for c|
|00000bf0| 6f 64 65 20 73 74 72 75 | 63 74 75 72 69 6e 67 20 |ode stru|cturing |
|00000c00| 61 6e 64 20 72 65 75 73 | 65 2e 0a 54 68 65 20 6c |and reus|e..The l|
|00000c10| 61 74 74 65 72 20 69 73 | 20 6e 65 63 65 73 73 61 |atter is| necessa|
|00000c20| 72 79 20 69 6e 20 65 76 | 6f 6c 76 69 6e 67 20 66 |ry in ev|olving f|
|00000c30| 72 6f 6d 20 70 72 6f 74 | 6f 74 79 70 65 20 74 6f |rom prot|otype to|
|00000c40| 20 61 20 73 74 72 75 63 | 74 75 72 65 64 2c 0a 6d | a struc|tured,.m|
|00000c50| 61 69 6e 74 61 69 6e 61 | 62 6c 65 2c 20 61 6e 64 |aintaina|ble, and|
|00000c60| 20 63 75 73 74 6f 6d 69 | 7a 61 62 6c 65 20 64 65 | customi|zable de|
|00000c70| 6c 69 76 65 72 61 62 6c | 65 2e 0a 0a 0a 2a 2a 20 |liverabl|e....** |
|00000c80| 43 72 65 61 74 69 6e 67 | 20 6e 65 77 20 6f 62 6a |Creating| new obj|
|00000c90| 65 63 74 73 2e 0a 0a 43 | 72 65 61 74 65 20 61 20 |ects...C|reate a |
|00000ca0| 6e 65 77 20 69 6e 73 74 | 61 6e 63 65 20 6f 66 20 |new inst|ance of |
|00000cb0| 61 20 63 6c 61 73 73 20 | 62 79 20 73 65 6e 64 69 |a class |by sendi|
|00000cc0| 6e 67 20 74 68 65 20 6d | 65 73 73 61 67 65 20 3a |ng the m|essage :|
|00000cd0| 4e 45 57 20 74 6f 0a 3c | 61 5f 63 6c 61 73 73 5f |NEW to.<|a_class_|
|00000ce0| 69 6e 73 74 61 6e 63 65 | 3e 3a 0a 0a 09 28 53 45 |instance|>:...(SE|
|00000cf0| 4e 44 20 3c 61 5f 63 6c | 61 73 73 5f 69 6e 73 74 |ND <a_cl|ass_inst|
|00000d00| 61 6e 63 65 3e 20 3a 4e | 45 57 20 3c 70 61 72 61 |ance> :N|EW <para|
|00000d10| 6d 65 74 65 72 73 3e 29 | 0a 0a 3c 61 5f 63 6c 61 |meters>)|..<a_cla|
|00000d20| 73 73 5f 69 6e 73 74 61 | 6e 63 65 3e 20 69 73 20 |ss_insta|nce> is |
|00000d30| 69 6e 20 66 61 63 74 20 | 61 6e 20 69 6e 73 74 61 |in fact |an insta|
|00000d40| 6e 63 65 20 6f 66 20 63 | 6c 61 73 73 20 43 4c 41 |nce of c|lass CLA|
|00000d50| 53 53 2e 20 43 6c 61 73 | 73 20 43 4c 41 53 53 20 |SS. Clas|s CLASS |
|00000d60| 61 6c 6c 6f 77 73 0a 79 | 6f 75 20 74 6f 20 64 65 |allows.y|ou to de|
|00000d70| 66 69 6e 65 20 6e 65 77 | 20 63 6c 61 73 73 20 69 |fine new| class i|
|00000d80| 6e 73 74 61 6e 63 65 73 | 20 62 79 20 73 70 65 63 |nstances| by spec|
|00000d90| 69 66 79 69 6e 67 20 74 | 68 65 20 69 6e 73 74 61 |ifying t|he insta|
|00000da0| 6e 63 65 20 76 61 72 69 | 61 62 6c 65 73 20 61 6e |nce vari|ables an|
|00000db0| 64 0a 70 61 72 65 6e 74 | 20 63 6c 61 73 73 20 6f |d.parent| class o|
|00000dc0| 66 20 61 20 70 61 72 74 | 69 63 75 6c 61 72 20 63 |f a part|icular c|
|00000dd0| 6c 61 73 73 2e 0a 0a 0a | 2a 2a 20 44 65 63 6c 61 |lass....|** Decla|
|00000de0| 72 69 6e 67 20 61 20 63 | 6c 61 73 73 2e 0a 0a 54 |ring a c|lass...T|
|00000df0| 6f 20 64 65 63 6c 61 72 | 65 20 61 20 22 62 61 73 |o declar|e a "bas|
|00000e00| 65 20 63 6c 61 73 73 22 | 20 6f 62 6a 65 63 74 2c |e class"| object,|
|00000e10| 20 74 68 61 74 20 69 73 | 2c 20 61 6e 20 6f 62 6a | that is|, an obj|
|00000e20| 65 63 74 20 77 69 74 68 | 20 6e 6f 20 70 61 72 65 |ect with| no pare|
|00000e30| 6e 74 20 6f 62 6a 65 63 | 74 2c 0a 6a 75 73 74 20 |nt objec|t,.just |
|00000e40| 73 65 6e 64 20 6d 65 73 | 73 61 67 65 20 3a 4e 45 |send mes|sage :NE|
|00000e50| 57 20 74 6f 20 74 68 65 | 20 6f 62 6a 65 63 74 20 |W to the| object |
|00000e60| 3c 43 4c 41 53 53 3e 0a | 0a 09 28 53 45 4e 44 20 |<CLASS>.|..(SEND |
|00000e70| 43 4c 41 53 53 20 3a 4e | 45 57 20 27 28 3c 69 76 |CLASS :N|EW '(<iv|
|00000e80| 61 72 30 3e 20 2e 2e 2e | 20 3c 69 76 61 72 4e 3e |ar0> ...| <ivarN>|
|00000e90| 29 0a 09 09 09 20 5b 27 | 28 3c 63 76 61 72 30 3e |).... ['|(<cvar0>|
|00000ea0| 20 2e 2e 2e 20 3c 63 76 | 61 72 4d 3e 29 5d 29 0a | ... <cv|arM>)]).|
|00000eb0| 0a 27 28 3c 69 76 61 72 | 30 3e 20 2e 2e 2e 20 28 |.'(<ivar|0> ... (|
|00000ec0| 69 76 61 72 4e 3e 29 20 | 61 72 65 20 61 20 6c 69 |ivarN>) |are a li|
|00000ed0| 73 74 20 6f 66 20 73 79 | 6d 62 6f 6c 73 2e 20 45 |st of sy|mbols. E|
|00000ee0| 61 63 68 20 3c 69 76 61 | 72 2d 69 3e 20 6e 61 6d |ach <iva|r-i> nam|
|00000ef0| 65 73 20 61 6e 0a 69 6e | 73 74 61 6e 63 65 20 76 |es an.in|stance v|
|00000f00| 61 72 69 61 62 6c 65 20 | 6f 66 20 74 68 65 20 63 |ariable |of the c|
|00000f10| 6c 61 73 73 2e 20 27 28 | 3c 63 76 61 72 30 3e 20 |lass. '(|<cvar0> |
|00000f20| 2e 2e 2e 20 3c 63 76 61 | 72 4d 3e 29 5d 29 20 61 |... <cva|rM>)]) a|
|00000f30| 72 65 20 61 6e 20 6f 70 | 74 69 6f 6e 61 6c 0a 6c |re an op|tional.l|
|00000f40| 69 73 74 20 6f 66 20 76 | 61 72 69 61 62 6c 65 73 |ist of v|ariables|
|00000f50| 20 74 68 61 74 20 61 72 | 65 20 73 68 61 72 65 64 | that ar|e shared|
|00000f60| 20 61 6d 6f 6e 67 20 61 | 6c 6c 20 69 6e 73 74 61 | among a|ll insta|
|00000f70| 6e 63 65 73 20 6f 66 20 | 74 68 61 74 20 70 61 72 |nces of |that par|
|00000f80| 74 69 63 75 6c 61 72 0a | 63 6c 61 73 73 2e 0a 0a |ticular.|class...|
|00000f90| 0a 2a 2a 20 44 65 66 69 | 6e 69 6e 67 20 6d 65 74 |.** Defi|ning met|
|00000fa0| 68 6f 64 73 2e 0a 0a 57 | 68 65 6e 20 61 20 22 6d |hods...W|hen a "m|
|00000fb0| 65 73 73 61 67 65 22 20 | 69 73 20 73 65 6e 74 20 |essage" |is sent |
|00000fc0| 74 6f 20 61 6e 20 6f 62 | 6a 65 63 74 2c 20 58 4c |to an ob|ject, XL|
|00000fd0| 49 53 50 20 73 65 61 72 | 63 68 65 73 20 66 6f 72 |ISP sear|ches for|
|00000fe0| 20 61 20 22 6d 65 74 68 | 6f 64 22 20 74 6f 0a 61 | a "meth|od" to.a|
|00000ff0| 6e 73 77 65 72 20 74 68 | 65 20 6d 65 73 73 61 67 |nswer th|e messag|
|00001000| 65 2e 20 41 20 6d 65 74 | 68 6f 64 20 69 73 20 61 |e. A met|hod is a|
|00001010| 20 70 69 65 63 65 20 6f | 66 20 4c 69 73 70 20 63 | piece o|f Lisp c|
|00001020| 6f 64 65 20 74 68 61 74 | 20 69 73 20 65 78 65 63 |ode that| is exec|
|00001030| 75 74 65 64 20 77 68 65 | 6e 0a 61 20 70 61 72 74 |uted whe|n.a part|
|00001040| 69 63 75 6c 61 72 20 6d | 65 73 73 61 67 65 20 69 |icular m|essage i|
|00001050| 73 20 73 65 6e 74 20 74 | 6f 20 61 6e 20 6f 62 6a |s sent t|o an obj|
|00001060| 65 63 74 2e 20 57 69 74 | 68 69 6e 20 74 68 65 20 |ect. Wit|hin the |
|00001070| 63 6f 64 65 20 6f 66 20 | 61 20 6d 65 74 68 6f 64 |code of |a method|
|00001080| 2c 20 61 6c 6c 0a 6f 62 | 6a 65 63 74 20 69 6e 73 |, all.ob|ject ins|
|00001090| 74 61 6e 63 65 20 61 6e | 64 20 63 6c 61 73 73 20 |tance an|d class |
|000010a0| 76 61 72 69 61 62 6c 65 | 73 20 61 72 65 20 61 63 |variable|s are ac|
|000010b0| 63 65 73 73 69 62 6c 65 | 2e 20 46 75 72 74 68 65 |cessible|. Furthe|
|000010c0| 72 6d 6f 72 65 2c 20 74 | 68 65 20 73 79 6d 62 6f |rmore, t|he symbo|
|000010d0| 6c 0a 27 73 65 6c 66 27 | 20 69 73 20 62 6f 75 6e |l.'self'| is boun|
|000010e0| 64 20 74 6f 20 74 68 65 | 20 6f 62 6a 65 63 74 20 |d to the| object |
|000010f0| 74 68 65 20 6d 65 73 73 | 61 67 65 20 77 61 73 20 |the mess|age was |
|00001100| 73 65 6e 74 20 74 6f 2e | 0a 0a 4d 65 74 68 6f 64 |sent to.|..Method|
|00001110| 73 20 61 72 65 20 64 65 | 66 69 6e 65 64 20 62 79 |s are de|fined by|
|00001120| 20 73 65 6e 64 69 6e 67 | 20 74 68 65 20 6d 65 73 | sending| the mes|
|00001130| 73 61 67 65 20 3a 41 4e | 53 57 45 52 20 74 6f 20 |sage :AN|SWER to |
|00001140| 3c 61 5f 63 6c 61 73 73 | 5f 69 6e 73 74 61 6e 63 |<a_class|_instanc|
|00001150| 65 3e 3a 0a 0a 09 28 53 | 45 4e 44 20 61 5f 63 6c |e>:...(S|END a_cl|
|00001160| 61 73 73 5f 69 6e 73 74 | 61 6e 63 65 20 3a 41 4e |ass_inst|ance :AN|
|00001170| 53 57 45 52 20 3c 3a 6d | 73 67 3e 20 3c 70 61 72 |SWER <:m|sg> <par|
|00001180| 61 6d 65 74 65 72 73 3e | 20 3c 63 6f 64 65 3e 29 |ameters>| <code>)|
|00001190| 0a 0a 77 68 65 72 65 20 | 3c 3a 6d 73 67 3e 20 69 |..where |<:msg> i|
|000011a0| 73 20 61 20 6b 65 79 77 | 6f 72 64 20 73 79 6d 62 |s a keyw|ord symb|
|000011b0| 6f 6c 20 28 61 20 73 79 | 6d 62 6f 6c 20 77 69 74 |ol (a sy|mbol wit|
|000011c0| 68 20 61 20 27 3a 27 20 | 70 72 65 66 69 78 29 20 |h a ':' |prefix) |
|000011d0| 72 65 70 72 65 73 65 6e | 74 69 6e 67 0a 74 68 65 |represen|ting.the|
|000011e0| 20 6d 65 73 73 61 67 65 | 3b 20 3c 70 61 72 61 6d | message|; <param|
|000011f0| 65 74 65 72 73 3e 20 61 | 72 65 20 74 68 65 20 61 |eters> a|re the a|
|00001200| 72 67 75 6d 65 6e 74 73 | 20 67 69 76 65 6e 20 61 |rguments| given a|
|00001210| 6c 6f 6e 67 20 77 69 74 | 68 20 74 68 65 20 6d 65 |long wit|h the me|
|00001220| 73 73 61 67 65 2e 0a 53 | 65 65 20 74 68 65 20 64 |ssage..S|ee the d|
|00001230| 6f 63 75 6d 65 6e 74 61 | 74 69 6f 6e 20 6f 6e 20 |ocumenta|tion on |
|00001240| 22 6c 61 6d 62 64 61 20 | 6c 69 73 74 73 22 20 69 |"lambda |lists" i|
|00001250| 6e 20 2f 77 69 6e 74 65 | 72 70 2f 64 6f 63 2f 78 |n /winte|rp/doc/x|
|00001260| 4c 69 73 70 2e 64 6f 63 | 20 70 2e 31 32 20 66 6f |Lisp.doc| p.12 fo|
|00001270| 72 0a 64 65 74 61 69 6c | 73 2e 20 20 3c 63 6f 64 |r.detail|s. <cod|
|00001280| 65 3e 20 69 73 20 61 20 | 6c 69 73 74 20 6f 66 20 |e> is a |list of |
|00001290| 73 2d 65 78 70 72 65 73 | 73 69 6f 6e 73 20 77 68 |s-expres|sions wh|
|000012a0| 69 63 68 20 67 65 74 20 | 65 76 61 6c 75 61 74 65 |ich get |evaluate|
|000012b0| 64 20 69 6e 20 72 65 73 | 70 6f 6e 73 65 0a 74 6f |d in res|ponse.to|
|000012c0| 20 61 20 6d 65 73 73 61 | 67 65 2e 20 54 68 65 20 | a messa|ge. The |
|000012d0| 6c 65 78 69 63 61 6c 20 | 65 6e 76 69 72 6f 6e 6d |lexical |environm|
|000012e0| 65 6e 74 20 74 68 61 74 | 20 65 78 69 73 74 65 64 |ent that| existed|
|000012f0| 20 66 6f 72 20 74 68 65 | 20 63 61 6c 6c 20 74 6f | for the| call to|
|00001300| 20 3a 41 4e 53 57 45 52 | 0a 77 69 6c 6c 20 62 65 | :ANSWER|.will be|
|00001310| 20 75 73 65 64 20 66 6f | 72 20 76 61 6c 75 65 20 | used fo|r value |
|00001320| 61 6e 64 20 66 75 6e 63 | 74 69 6f 6e 61 6c 20 62 |and func|tional b|
|00001330| 69 6e 64 69 6e 67 73 20 | 64 75 72 69 6e 67 20 6d |indings |during m|
|00001340| 65 74 68 6f 64 20 65 76 | 61 6c 75 61 74 69 6f 6e |ethod ev|aluation|
|00001350| 2e 0a 0a 49 66 20 79 6f | 75 20 6e 65 65 64 20 74 |...If yo|u need t|
|00001360| 6f 20 72 65 6d 65 6d 62 | 65 72 20 77 68 61 74 20 |o rememb|er what |
|00001370| 74 68 65 20 73 79 6e 74 | 61 78 20 69 73 2c 20 63 |the synt|ax is, c|
|00001380| 6f 6e 73 69 64 65 72 20 | 74 68 65 20 6d 65 6d 6f |onsider |the memo|
|00001390| 72 79 2d 68 65 6c 70 65 | 72 0a 20 20 20 20 22 74 |ry-helpe|r. "t|
|000013a0| 68 69 73 20 63 6c 61 73 | 73 20 3a 41 4e 53 57 45 |his clas|s :ANSWE|
|000013b0| 52 73 20 74 6f 20 3a 4d | 45 53 53 41 47 45 2e 2e |Rs to :M|ESSAGE..|
|000013c0| 2e 22 20 3d 3d 20 28 73 | 65 6e 64 20 3c 63 6c 73 |." == (s|end <cls|
|000013d0| 3e 20 3a 41 4e 53 57 45 | 52 20 3a 4d 45 53 53 41 |> :ANSWE|R :MESSA|
|000013e0| 47 45 20 2e 2e 2e 29 0a | 0a 0a 2a 2a 20 49 6e 68 |GE ...).|..** Inh|
|000013f0| 65 72 69 74 61 6e 63 65 | 0a 0a 53 6f 20 66 61 72 |eritance|..So far|
|00001400| 2c 20 74 68 65 20 6f 62 | 6a 65 63 74 20 73 79 73 |, the ob|ject sys|
|00001410| 74 65 6d 20 77 65 20 6a | 75 73 74 20 64 65 73 63 |tem we j|ust desc|
|00001420| 72 69 62 65 64 20 73 75 | 70 70 6f 72 74 73 20 2a |ribed su|pports *|
|00001430| 65 6e 63 61 70 73 75 6c | 61 74 69 6f 6e 2a 2e 0a |encapsul|ation*..|
|00001440| 45 6e 63 61 70 73 75 6c | 61 74 69 6f 6e 20 69 73 |Encapsul|ation is|
|00001450| 20 67 6f 6f 64 20 70 72 | 6f 67 72 61 6d 6d 69 6e | good pr|ogrammin|
|00001460| 67 20 70 72 61 63 74 69 | 63 65 20 62 65 63 61 75 |g practi|ce becau|
|00001470| 73 65 20 69 74 20 68 65 | 6c 70 73 20 6c 6f 63 61 |se it he|lps loca|
|00001480| 6c 69 7a 65 20 61 6e 64 | 0a 64 65 74 61 6e 67 6c |lize and|.detangl|
|00001490| 65 20 63 6f 6d 70 6c 65 | 78 69 74 79 2e 20 55 6e |e comple|xity. Un|
|000014a0| 66 6f 72 74 75 6e 61 74 | 65 6c 79 2c 20 65 6e 63 |fortunat|ely, enc|
|000014b0| 61 70 73 75 6c 61 74 69 | 6f 6e 20 72 75 6e 73 20 |apsulati|on runs |
|000014c0| 63 6f 75 6e 74 65 72 20 | 74 6f 0a 66 6c 65 78 69 |counter |to.flexi|
|000014d0| 62 69 6c 69 74 79 20 62 | 65 63 61 75 73 65 20 6d |bility b|ecause m|
|000014e0| 61 6b 69 6e 67 20 66 6c | 65 78 69 62 6c 65 20 75 |aking fl|exible u|
|000014f0| 73 65 20 6f 66 20 61 6e | 20 6f 62 6a 65 63 74 20 |se of an| object |
|00001500| 6d 61 79 20 72 65 71 75 | 69 72 65 20 74 68 61 74 |may requ|ire that|
|00001510| 0a 63 65 72 74 61 69 6e | 20 67 72 6f 75 70 73 20 |.certain| groups |
|00001520| 6f 66 20 69 6e 73 74 61 | 6e 63 65 20 76 61 72 69 |of insta|nce vari|
|00001530| 61 62 6c 65 73 20 62 65 | 20 61 63 63 65 73 73 65 |ables be| accesse|
|00001540| 64 20 62 79 20 64 69 66 | 66 65 72 65 6e 74 20 6c |d by dif|ferent l|
|00001550| 61 79 65 72 73 20 6f 66 | 20 6e 65 77 0a 66 75 6e |ayers of| new.fun|
|00001560| 63 74 69 6f 6e 61 6c 69 | 74 79 2e 20 4d 6f 73 74 |ctionali|ty. Most|
|00001570| 20 6f 66 74 65 6e 2c 20 | 6f 6e 65 20 77 61 6e 74 | often, |one want|
|00001580| 73 20 74 6f 20 2a 72 65 | 75 73 65 2a 20 61 73 70 |s to *re|use* asp|
|00001590| 65 63 74 73 20 6f 66 20 | 61 20 70 61 72 74 69 63 |ects of |a partic|
|000015a0| 75 6c 61 72 0a 63 6c 61 | 73 73 20 69 6e 20 63 72 |ular.cla|ss in cr|
|000015b0| 65 61 74 69 6e 67 20 63 | 6f 64 65 20 74 68 61 74 |eating c|ode that|
|000015c0| 20 73 70 65 63 69 61 6c | 69 7a 65 73 20 61 6e 64 | special|izes and|
|000015d0| 20 61 6c 74 65 72 73 20 | 74 68 65 20 66 75 6e 63 | alters |the func|
|000015e0| 74 69 6f 6e 61 6c 69 74 | 79 20 6f 66 0a 74 68 61 |tionalit|y of.tha|
|000015f0| 74 20 63 6c 61 73 73 2e | 20 41 20 63 6f 6d 70 72 |t class.| A compr|
|00001600| 6f 6d 69 73 65 20 62 65 | 74 77 65 65 6e 20 65 6e |omise be|tween en|
|00001610| 63 61 70 73 75 6c 61 74 | 69 6f 6e 20 61 6e 64 20 |capsulat|ion and |
|00001620| 66 6c 65 78 69 62 69 6c | 69 74 79 20 69 73 20 66 |flexibil|ity is f|
|00001630| 6f 75 6e 64 20 62 79 0a | 75 73 69 6e 67 20 2a 69 |ound by.|using *i|
|00001640| 6e 68 65 72 69 74 61 6e | 63 65 2a 20 69 6e 20 61 |nheritan|ce* in a|
|00001650| 6e 20 6f 62 6a 65 63 74 | 20 73 79 73 74 65 6d 2e |n object| system.|
|00001660| 20 49 6e 68 65 72 69 74 | 61 6e 63 65 20 69 73 20 | Inherit|ance is |
|00001670| 75 73 65 64 20 74 6f 20 | 61 6c 6c 6f 77 20 61 0a |used to |allow a.|
|00001680| 20 2a 73 75 62 63 6c 61 | 73 73 2a 20 74 6f 20 73 | *subcla|ss* to s|
|00001690| 70 65 63 69 61 6c 69 7a | 65 20 74 68 65 20 66 75 |pecializ|e the fu|
|000016a0| 6e 63 74 69 6f 6e 61 6c | 69 74 79 20 6f 66 20 69 |nctional|ity of i|
|000016b0| 74 27 73 20 2a 70 61 72 | 65 6e 74 20 63 6c 61 73 |t's *par|ent clas|
|000016c0| 73 2a 20 28 61 6b 61 2c | 0a 74 68 65 20 2a 73 75 |s* (aka,|.the *su|
|000016d0| 70 65 72 63 6c 61 73 73 | 2a 29 3a 0a 0a 09 28 73 |perclass|*):...(s|
|000016e0| 65 6e 64 20 43 6c 61 73 | 73 20 3a 4e 45 57 20 27 |end Clas|s :NEW '|
|000016f0| 28 3c 69 76 61 72 30 3e | 20 2e 2e 2e 20 3c 69 76 |(<ivar0>| ... <iv|
|00001700| 61 72 4e 3e 29 0a 20 20 | 20 20 20 20 20 20 20 20 |arN>). | |
|00001710| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 27 | | '|
|00001720| 28 3c 63 76 61 72 30 3e | 20 2e 2e 2e 20 3c 63 76 |(<cvar0>| ... <cv|
|00001730| 61 72 4d 3e 29 0a 09 09 | 09 20 3c 73 75 70 65 72 |arM>)...|. <super|
|00001740| 63 6c 61 73 73 3e 29 0a | 0a 28 3c 69 76 61 72 30 |class>).|.(<ivar0|
|00001750| 3e 20 2e 2e 2e 20 3c 69 | 76 61 72 4e 3e 29 20 69 |> ... <i|varN>) i|
|00001760| 73 20 61 20 6c 69 73 74 | 20 6f 66 20 6e 65 77 20 |s a list| of new |
|00001770| 69 6e 73 74 61 6e 63 65 | 20 76 61 72 69 61 62 6c |instance| variabl|
|00001780| 65 73 20 69 6e 20 74 68 | 65 20 73 75 62 63 6c 61 |es in th|e subcla|
|00001790| 73 73 3b 0a 28 3c 63 76 | 61 72 30 3e 20 2e 2e 2e |ss;.(<cv|ar0> ...|
|000017a0| 20 3c 63 76 61 72 4e 3e | 29 20 69 73 20 61 20 6c | <cvarN>|) is a l|
|000017b0| 69 73 74 20 6f 66 20 6e | 65 77 20 63 6c 61 73 73 |ist of n|ew class|
|000017c0| 20 76 61 72 69 61 62 6c | 65 73 20 69 6e 20 74 68 | variabl|es in th|
|000017d0| 65 20 73 75 62 63 6c 61 | 73 73 3b 0a 3c 73 75 70 |e subcla|ss;.<sup|
|000017e0| 65 72 63 6c 61 73 73 3e | 20 69 73 20 61 20 63 6c |erclass>| is a cl|
|000017f0| 61 73 73 20 69 6e 73 74 | 61 6e 63 65 20 72 65 70 |ass inst|ance rep|
|00001800| 72 65 73 65 6e 74 69 6e | 67 20 74 68 65 20 70 61 |resentin|g the pa|
|00001810| 72 65 6e 74 20 66 72 6f | 6d 20 77 68 69 63 68 0a |rent fro|m which.|
|00001820| 74 68 65 20 6e 65 77 20 | 73 75 62 63 6c 61 73 73 |the new |subclass|
|00001830| 20 69 6e 68 65 72 69 74 | 73 20 76 61 72 69 61 62 | inherit|s variab|
|00001840| 6c 65 73 20 61 6e 64 20 | 6d 65 74 68 6f 64 73 2e |les and |methods.|
|00001850| 0a 0a 22 49 6e 68 65 72 | 69 74 61 6e 63 65 22 20 |.."Inher|itance" |
|00001860| 69 73 20 6f 63 63 75 72 | 72 69 6e 67 20 62 65 63 |is occur|ring bec|
|00001870| 61 75 73 65 20 61 6c 6c | 20 74 68 65 20 69 6e 73 |ause all| the ins|
|00001880| 74 61 6e 63 65 20 76 61 | 72 69 61 62 6c 65 73 20 |tance va|riables |
|00001890| 6f 66 20 61 6c 6c 20 74 | 68 65 0a 70 61 72 65 6e |of all t|he.paren|
|000018a0| 74 20 63 6c 61 73 73 65 | 73 20 6f 66 20 74 68 65 |t classe|s of the|
|000018b0| 20 6e 65 77 20 73 75 62 | 63 6c 61 73 73 20 62 65 | new sub|class be|
|000018c0| 63 6f 6d 65 20 74 68 65 | 20 76 61 72 69 61 62 6c |come the| variabl|
|000018d0| 65 73 20 6f 66 20 65 61 | 63 68 20 73 75 62 63 6c |es of ea|ch subcl|
|000018e0| 61 73 73 0a 69 6e 73 74 | 61 6e 63 65 2e 20 46 75 |ass.inst|ance. Fu|
|000018f0| 72 74 68 65 72 6d 6f 72 | 65 2c 20 61 6c 6c 20 6d |rthermor|e, all m|
|00001900| 65 74 68 6f 64 73 20 64 | 65 66 69 6e 65 64 20 6f |ethods d|efined o|
|00001910| 6e 20 61 20 70 61 72 65 | 6e 74 20 63 6c 61 73 73 |n a pare|nt class|
|00001920| 20 6d 61 79 20 61 6c 73 | 6f 20 62 65 0a 75 73 65 | may als|o be.use|
|00001930| 64 20 6f 6e 20 61 20 73 | 75 62 63 6c 61 73 73 20 |d on a s|ubclass |
|00001940| 69 6e 73 74 61 6e 63 65 | 2e 20 4e 6f 74 65 20 74 |instance|. Note t|
|00001950| 68 61 74 20 77 68 69 6c | 65 20 61 20 73 75 62 63 |hat whil|e a subc|
|00001960| 6c 61 73 73 27 20 6d 65 | 74 68 6f 64 73 20 63 61 |lass' me|thods ca|
|00001970| 6e 20 61 63 63 65 73 73 | 0a 74 68 65 20 76 61 72 |n access|.the var|
|00001980| 69 61 62 6c 65 73 20 64 | 65 66 69 6e 65 64 20 6f |iables d|efined o|
|00001990| 6e 20 74 68 65 20 70 61 | 72 65 6e 74 20 63 6c 61 |n the pa|rent cla|
|000019a0| 73 73 65 73 2c 20 74 68 | 65 20 72 65 76 65 72 73 |sses, th|e revers|
|000019b0| 65 20 69 73 6e 27 74 20 | 74 72 75 65 2e 0a 0a 0a |e isn't |true....|
|000019c0| 2a 2a 20 4f 62 6a 65 63 | 74 20 69 6e 69 74 69 61 |** Objec|t initia|
|000019d0| 6c 69 7a 61 74 69 6f 6e | 2e 0a 0a 41 73 20 6d 65 |lization|...As me|
|000019e0| 6e 74 69 6f 6e 65 64 20 | 65 61 72 6c 69 65 72 2c |ntioned |earlier,|
|000019f0| 20 6e 65 77 20 6f 62 6a | 65 63 74 20 69 6e 73 74 | new obj|ect inst|
|00001a00| 61 6e 63 65 73 20 61 72 | 65 20 63 72 65 61 74 65 |ances ar|e create|
|00001a10| 64 20 62 79 20 73 65 6e | 64 69 6e 67 20 74 68 65 |d by sen|ding the|
|00001a20| 0a 6d 65 73 73 61 67 65 | 20 3a 4e 45 57 20 74 6f |.message| :NEW to|
|00001a30| 20 61 20 63 6c 61 73 73 | 20 6f 62 6a 65 63 74 2e | a class| object.|
|00001a40| 20 53 65 6e 64 69 6e 67 | 20 74 68 65 20 6d 65 73 | Sending| the mes|
|00001a50| 73 61 67 65 20 3a 4e 45 | 57 20 74 6f 20 61 20 63 |sage :NE|W to a c|
|00001a60| 6c 61 73 73 0a 61 75 74 | 6f 6d 61 74 69 63 61 6c |lass.aut|omatical|
|00001a70| 6c 79 20 73 65 6e 64 73 | 20 6d 65 73 73 61 67 65 |ly sends| message|
|00001a80| 20 3a 49 53 4e 45 57 20 | 74 6f 20 74 68 65 20 6e | :ISNEW |to the n|
|00001a90| 65 77 6c 79 20 63 72 65 | 61 74 65 64 20 69 6e 73 |ewly cre|ated ins|
|00001aa0| 74 61 6e 63 65 2e 20 42 | 79 0a 64 65 66 61 75 6c |tance. B|y.defaul|
|00001ab0| 74 20 3a 49 53 4e 45 57 | 20 6f 6e 20 61 6e 20 69 |t :ISNEW| on an i|
|00001ac0| 6e 73 74 61 6e 63 65 20 | 69 73 20 61 20 6e 6f 2d |nstance |is a no-|
|00001ad0| 6f 70 20 6d 65 74 68 6f | 64 20 64 65 66 69 6e 65 |op metho|d define|
|00001ae0| 64 20 6f 6e 20 63 6c 61 | 73 73 20 27 4f 62 6a 65 |d on cla|ss 'Obje|
|00001af0| 63 74 27 2c 0a 77 68 69 | 63 68 20 69 73 20 74 68 |ct',.whi|ch is th|
|00001b00| 65 20 69 6d 70 6c 69 63 | 69 74 20 5b 28 67 72 61 |e implic|it [(gra|
|00001b10| 6e 64 29 2a 5d 70 61 72 | 65 6e 74 20 6f 66 20 61 |nd)*]par|ent of a|
|00001b20| 6c 6c 20 69 6e 73 74 61 | 6e 63 65 73 2e 20 49 66 |ll insta|nces. If|
|00001b30| 20 79 6f 75 20 77 61 6e | 74 20 74 6f 0a 69 6e 69 | you wan|t to.ini|
|00001b40| 74 69 61 6c 69 7a 65 20 | 74 68 65 20 69 6e 73 74 |tialize |the inst|
|00001b50| 61 6e 63 65 2f 63 6c 61 | 73 73 20 76 61 72 69 61 |ance/cla|ss varia|
|00001b60| 62 6c 65 73 20 6f 66 20 | 61 20 70 61 72 74 69 63 |bles of |a partic|
|00001b70| 75 6c 61 72 20 63 6c 61 | 73 73 2c 20 79 6f 75 20 |ular cla|ss, you |
|00001b80| 6d 75 73 74 0a 64 65 66 | 69 6e 65 20 61 6e 20 3a |must.def|ine an :|
|00001b90| 49 53 4e 45 57 20 6d 65 | 74 68 6f 64 20 6f 6e 20 |ISNEW me|thod on |
|00001ba0| 74 68 65 20 63 6c 61 73 | 73 2e 20 20 41 6e 79 20 |the clas|s. Any |
|00001bb0| 70 61 72 61 6d 65 74 65 | 72 73 20 6f 72 69 67 69 |paramete|rs origi|
|00001bc0| 6e 61 6c 6c 79 20 73 65 | 6e 74 20 74 6f 0a 74 68 |nally se|nt to.th|
|00001bd0| 65 20 3a 4e 45 57 20 6d | 65 74 68 6f 64 20 77 69 |e :NEW m|ethod wi|
|00001be0| 6c 6c 20 62 65 20 70 61 | 73 73 65 64 20 6f 6e 20 |ll be pa|ssed on |
|00001bf0| 74 6f 20 74 68 65 20 3a | 49 53 4e 45 57 20 6d 65 |to the :|ISNEW me|
|00001c00| 74 68 6f 64 20 61 6e 64 | 20 6d 61 79 20 62 65 20 |thod and| may be |
|00001c10| 75 73 65 64 20 74 6f 0a | 69 6e 69 74 69 61 6c 69 |used to.|initiali|
|00001c20| 7a 65 20 61 6e 20 6f 62 | 6a 65 63 74 20 74 6f 20 |ze an ob|ject to |
|00001c30| 6f 75 74 73 69 64 65 2d | 77 6f 72 6c 64 20 70 61 |outside-|world pa|
|00001c40| 72 61 6d 65 74 65 72 73 | 2e 0a 0a 0a 2a 2a 20 45 |rameters|....** E|
|00001c50| 78 61 6d 70 6c 65 20 6f | 66 20 75 73 69 6e 67 20 |xample o|f using |
|00001c60| 4f 4f 50 20 66 65 61 74 | 75 72 65 73 20 6f 66 20 |OOP feat|ures of |
|00001c70| 58 4c 49 53 50 20 77 69 | 74 68 20 4d 6f 74 69 66 |XLISP wi|th Motif|
|00001c80| 20 77 69 64 67 65 74 73 | 3a 0a 0a 41 73 20 63 75 | widgets|:..As cu|
|00001c90| 72 72 65 6e 74 6c 79 20 | 69 6d 70 6c 65 6d 65 6e |rrently |implemen|
|00001ca0| 74 65 64 2c 20 74 68 65 | 20 4d 6f 74 69 66 20 63 |ted, the| Motif c|
|00001cb0| 6c 61 73 73 20 78 6d 4c | 69 73 74 57 69 64 67 65 |lass xmL|istWidge|
|00001cc0| 74 43 6c 61 73 73 20 6d | 61 6b 65 73 20 69 74 20 |tClass m|akes it |
|00001cd0| 61 20 62 69 74 0a 62 61 | 72 6f 71 75 65 20 74 6f |a bit.ba|roque to|
|00001ce0| 20 63 72 65 61 74 65 20 | 62 72 6f 77 73 65 72 73 | create |browsers|
|00001cf0| 20 28 68 6f 70 65 66 75 | 6c 6c 79 20 74 68 69 73 | (hopefu|lly this|
|00001d00| 20 77 69 6c 6c 20 63 68 | 61 6e 67 65 20 69 6e 20 | will ch|ange in |
|00001d10| 4d 6f 74 69 66 20 31 2e | 31 29 2e 20 20 54 68 65 |Motif 1.|1). The|
|00001d20| 0a 70 72 6f 62 6c 65 6d | 20 69 73 20 74 68 61 74 |.problem| is that|
|00001d30| 20 61 20 22 62 72 6f 77 | 73 65 72 22 20 69 73 20 | a "brow|ser" is |
|00001d40| 61 20 6b 69 6e 64 20 6f | 66 20 61 70 70 6c 69 63 |a kind o|f applic|
|00001d50| 61 74 69 6f 6e 20 74 68 | 61 74 20 6c 65 6e 64 73 |ation th|at lends|
|00001d60| 20 69 74 73 65 6c 66 20 | 74 6f 0a 6f 62 6a 65 63 | itself |to.objec|
|00001d70| 74 20 6f 72 69 65 6e 74 | 65 64 20 74 65 63 68 6e |t orient|ed techn|
|00001d80| 69 71 75 65 73 20 74 68 | 61 74 20 61 72 65 20 6e |iques th|at are n|
|00001d90| 6f 74 20 61 6c 77 61 79 | 73 20 73 74 72 61 69 67 |ot alway|s straig|
|00001da0| 68 74 66 6f 72 77 61 72 | 64 20 74 6f 20 73 75 70 |htforwar|d to sup|
|00001db0| 70 6f 72 74 0a 69 6e 20 | 43 2e 20 4f 6e 65 20 6f |port.in |C. One o|
|00001dc0| 66 74 65 6e 20 68 61 73 | 20 61 20 63 6f 6c 6c 65 |ften has| a colle|
|00001dd0| 63 74 69 6f 6e 20 6f 66 | 20 27 74 68 69 6e 67 73 |ction of| 'things|
|00001de0| 27 20 74 68 61 74 20 6f | 6e 65 20 77 61 6e 74 73 |' that o|ne wants|
|00001df0| 20 74 6f 20 64 69 73 70 | 6c 61 79 20 69 6e 20 61 | to disp|lay in a|
|00001e00| 0a 27 6c 69 73 74 27 20 | 61 6e 64 20 70 65 72 66 |.'list' |and perf|
|00001e10| 6f 72 6d 20 61 63 74 69 | 6f 6e 73 20 6f 6e 20 74 |orm acti|ons on t|
|00001e20| 68 65 20 27 74 68 69 6e | 67 27 20 63 6f 72 72 65 |he 'thin|g' corre|
|00001e30| 73 70 6f 6e 64 69 6e 67 | 20 74 6f 20 74 68 65 20 |sponding| to the |
|00001e40| 76 69 73 75 61 6c 0a 73 | 65 6c 65 63 74 69 6f 6e |visual.s|election|
|00001e50| 20 6f 66 20 61 6e 20 65 | 6c 65 6d 65 6e 74 20 69 | of an e|lement i|
|00001e60| 6e 20 74 68 65 20 64 69 | 73 70 6c 61 79 65 64 20 |n the di|splayed |
|00001e70| 6c 69 73 74 2e 20 78 6d | 4c 69 73 74 57 69 64 67 |list. xm|ListWidg|
|00001e80| 65 74 43 6c 61 73 73 20 | 77 69 6c 6c 0a 64 69 73 |etClass |will.dis|
|00001e90| 70 6c 61 79 20 61 6e 20 | 61 72 72 72 61 79 20 6f |play an |arrray o|
|00001ea0| 66 20 58 6d 53 74 72 69 | 6e 67 73 20 69 6e 20 61 |f XmStri|ngs in a|
|00001eb0| 20 6c 69 73 74 2e 20 57 | 68 65 6e 20 6f 6e 65 20 | list. W|hen one |
|00001ec0| 6f 72 20 6d 6f 72 65 20 | 65 6c 65 6d 65 6e 74 73 |or more |elements|
|00001ed0| 20 69 6e 20 74 68 65 0a | 6c 69 73 74 20 61 72 65 | in the.|list are|
|00001ee0| 20 73 65 6c 65 63 74 65 | 64 2c 20 58 6d 53 74 72 | selecte|d, XmStr|
|00001ef0| 69 6e 67 73 20 63 6f 72 | 72 65 73 70 6f 6e 64 69 |ings cor|respondi|
|00001f00| 6e 67 20 74 6f 20 74 68 | 65 20 73 65 6c 65 63 74 |ng to th|e select|
|00001f10| 65 64 20 65 6c 65 6d 65 | 6e 74 73 20 61 72 65 0a |ed eleme|nts are.|
|00001f20| 72 65 74 75 72 6e 65 64 | 2e 20 53 69 6e 63 65 20 |returned|. Since |
|00001f30| 74 68 65 20 58 6d 53 74 | 72 69 6e 67 73 20 79 6f |the XmSt|rings yo|
|00001f40| 75 20 70 75 74 20 69 6e | 74 6f 20 74 68 65 20 6c |u put in|to the l|
|00001f50| 69 73 74 20 77 69 64 67 | 65 74 20 61 72 65 20 6e |ist widg|et are n|
|00001f60| 6f 74 20 74 68 65 0a 58 | 6d 53 74 72 69 6e 67 73 |ot the.X|mStrings|
|00001f70| 20 79 6f 75 20 67 65 74 | 20 6f 75 74 2c 20 79 6f | you get| out, yo|
|00001f80| 75 20 6d 75 73 74 20 63 | 61 6c 6c 20 58 6d 53 74 |u must c|all XmSt|
|00001f90| 72 69 6e 67 43 6f 6d 70 | 61 72 65 20 6f 6e 20 65 |ringComp|are on e|
|00001fa0| 61 63 68 20 65 6c 65 6d | 65 6e 74 20 6f 66 20 74 |ach elem|ent of t|
|00001fb0| 68 65 0a 63 6f 6c 6c 65 | 63 74 69 6f 6e 20 6f 66 |he.colle|ction of|
|00001fc0| 20 27 74 68 69 6e 67 73 | 27 20 74 6f 20 66 69 6e | 'things|' to fin|
|00001fd0| 64 20 6f 75 74 20 77 68 | 69 63 68 20 6f 6e 65 73 |d out wh|ich ones|
|00001fe0| 20 61 72 65 20 73 65 6c | 65 63 74 65 64 2e 20 20 | are sel|ected. |
|00001ff0| 50 72 65 73 75 6d 61 62 | 6c 79 2c 0a 79 6f 75 27 |Presumab|ly,.you'|
|00002000| 6c 6c 20 77 61 6e 74 20 | 74 6f 20 64 6f 20 6d 6f |ll want |to do mo|
|00002010| 72 65 20 74 68 61 6e 20 | 6a 75 73 74 20 67 65 74 |re than |just get|
|00002020| 20 62 61 63 6b 20 61 6e | 20 58 6d 53 74 72 69 6e | back an| XmStrin|
|00002030| 67 2e 2e 2e 20 20 6e 6f | 72 6d 61 6c 6c 79 20 6f |g... no|rmally o|
|00002040| 6e 65 20 77 69 6c 6c 0a | 77 61 6e 74 20 74 6f 20 |ne will.|want to |
|00002050| 61 63 63 65 73 73 20 64 | 61 74 61 20 73 74 72 75 |access d|ata stru|
|00002060| 63 74 75 72 65 73 20 61 | 73 73 6f 63 69 61 74 65 |ctures a|ssociate|
|00002070| 64 20 77 69 74 68 20 74 | 68 65 20 58 6d 53 74 72 |d with t|he XmStr|
|00002080| 69 6e 67 20 73 6f 20 61 | 73 20 74 6f 20 70 65 72 |ing so a|s to per|
|00002090| 66 6f 72 6d 0a 61 6e 20 | 61 63 74 69 6f 6e 20 64 |form.an |action d|
|000020a0| 65 70 65 6e 64 65 6e 74 | 20 6f 6e 20 74 68 6f 73 |ependent| on thos|
|000020b0| 65 20 73 74 72 75 63 74 | 75 72 65 73 2e 20 54 68 |e struct|ures. Th|
|000020c0| 69 73 20 63 6f 75 6c 64 | 20 62 65 20 64 6f 6e 65 |is could| be done|
|000020d0| 20 77 69 74 68 20 61 20 | 6c 6f 6f 6b 75 70 0a 74 | with a |lookup.t|
|000020e0| 61 62 6c 65 2c 20 62 75 | 74 20 74 68 65 72 65 27 |able, bu|t there'|
|000020f0| 73 20 61 6c 73 6f 20 61 | 20 62 65 74 74 65 72 20 |s also a| better |
|00002100| 77 61 79 2e 2e 2e 0a 0a | 57 49 4e 54 45 52 50 20 |way.....|WINTERP |
|00002110| 61 6c 6c 6f 77 73 20 75 | 73 20 74 6f 20 73 75 62 |allows u|s to sub|
|00002120| 63 6c 61 73 73 20 74 68 | 65 20 4d 6f 74 69 66 20 |class th|e Motif |
|00002130| 6c 69 73 74 20 77 69 64 | 67 65 74 20 73 6f 20 61 |list wid|get so a|
|00002140| 73 20 74 6f 20 6d 61 6b | 65 20 69 74 20 68 61 76 |s to mak|e it hav|
|00002150| 65 0a 74 68 65 20 6b 69 | 6e 64 20 6f 66 20 66 75 |e.the ki|nd of fu|
|00002160| 6e 63 74 69 6f 6e 61 6c | 69 74 79 20 77 65 20 77 |nctional|ity we w|
|00002170| 61 6e 74 2e 20 54 68 69 | 73 20 73 75 62 63 6c 61 |ant. Thi|s subcla|
|00002180| 73 73 20 77 69 6c 6c 20 | 63 6f 6e 74 61 69 6e 20 |ss will |contain |
|00002190| 61 6e 20 61 64 64 69 74 | 69 6f 6e 61 6c 0a 69 6e |an addit|ional.in|
|000021a0| 73 74 61 6e 63 65 20 76 | 61 72 69 61 62 6c 65 20 |stance v|ariable |
|000021b0| 27 69 74 65 6d 73 27 20 | 77 68 69 63 68 20 69 73 |'items' |which is|
|000021c0| 20 61 6e 20 61 72 72 61 | 79 20 6f 66 20 61 72 62 | an arra|y of arb|
|000021d0| 69 74 72 61 72 79 20 58 | 4c 49 53 50 20 6f 62 6a |itrary X|LISP obj|
|000021e0| 65 63 74 73 20 74 6f 0a | 62 65 20 64 69 73 70 6c |ects to.|be displ|
|000021f0| 61 79 65 64 20 69 6e 20 | 61 20 74 65 78 74 75 61 |ayed in |a textua|
|00002200| 6c 20 62 72 6f 77 73 65 | 72 20 6d 61 64 65 20 66 |l browse|r made f|
|00002210| 72 6f 6d 20 74 68 65 20 | 6c 69 73 74 20 77 69 64 |rom the |list wid|
|00002220| 67 65 74 2e 20 54 68 65 | 73 65 20 6f 62 6a 65 63 |get. The|se objec|
|00002230| 74 73 0a 63 61 6e 20 68 | 61 76 65 20 63 6f 6d 70 |ts.can h|ave comp|
|00002240| 6c 65 74 65 6c 79 20 64 | 69 66 66 65 72 65 6e 74 |letely d|ifferent|
|00002250| 20 69 6e 74 65 72 6e 61 | 6c 20 72 65 70 72 65 73 | interna|l repres|
|00002260| 65 6e 74 61 74 69 6f 6e | 73 20 2d 2d 20 74 68 65 |entation|s -- the|
|00002270| 20 6f 6e 6c 79 0a 72 65 | 71 75 69 72 65 6d 65 6e | only.re|quiremen|
|00002280| 74 20 69 73 20 74 68 61 | 74 20 74 68 65 79 20 66 |t is tha|t they f|
|00002290| 6f 6c 6c 6f 77 20 74 68 | 65 20 70 72 6f 74 6f 63 |ollow th|e protoc|
|000022a0| 6f 6c 20 6f 66 20 62 65 | 69 6e 67 20 61 62 6c 65 |ol of be|ing able|
|000022b0| 20 74 6f 20 72 65 73 70 | 6f 6e 64 20 74 6f 0a 74 | to resp|ond to.t|
|000022c0| 68 65 20 6d 65 73 73 61 | 67 65 73 20 3a 44 49 53 |he messa|ges :DIS|
|000022d0| 50 4c 41 59 5f 53 54 52 | 49 4e 47 20 61 6e 64 20 |PLAY_STR|ING and |
|000022e0| 3a 44 45 46 41 55 4c 54 | 5f 41 43 54 49 4f 4e 2e |:DEFAULT|_ACTION.|
|000022f0| 20 3a 44 49 53 50 4c 41 | 59 5f 53 54 52 49 4e 47 | :DISPLA|Y_STRING|
|00002300| 20 72 65 74 75 72 6e 73 | 20 61 0a 73 74 72 69 6e | returns| a.strin|
|00002310| 67 20 72 65 70 72 65 73 | 65 6e 74 61 74 69 6f 6e |g repres|entation|
|00002320| 20 6f 66 20 74 68 65 20 | 6f 62 6a 65 63 74 20 74 | of the |object t|
|00002330| 6f 20 62 65 20 64 69 73 | 70 6c 61 79 65 64 20 69 |o be dis|played i|
|00002340| 6e 20 74 68 65 20 62 72 | 6f 77 73 65 72 2e 0a 3a |n the br|owser..:|
|00002350| 44 45 46 41 55 4c 54 5f | 41 43 54 49 4f 4e 20 69 |DEFAULT_|ACTION i|
|00002360| 73 20 74 68 65 20 61 63 | 74 69 6f 6e 20 74 6f 20 |s the ac|tion to |
|00002370| 62 65 20 70 65 72 66 6f | 72 6d 65 64 20 77 68 65 |be perfo|rmed whe|
|00002380| 6e 20 61 20 6c 69 73 74 | 20 69 74 65 6d 20 69 73 |n a list| item is|
|00002390| 20 62 72 6f 77 73 65 64 | 0a 28 62 79 20 64 6f 75 | browsed|.(by dou|
|000023a0| 62 6c 65 20 63 6c 69 63 | 6b 69 6e 67 20 6f 6e 20 |ble clic|king on |
|000023b0| 74 68 65 20 69 74 65 6d | 29 2e 0a 0a 54 68 65 20 |the item|)...The |
|000023c0| 66 6f 6c 6c 6f 77 69 6e | 67 20 63 72 65 61 74 65 |followin|g create|
|000023d0| 73 20 74 68 65 20 73 75 | 62 63 6c 61 73 73 20 3c |s the su|bclass <|
|000023e0| 4c 69 73 74 5f 42 72 6f | 77 73 65 72 3e 20 66 72 |List_Bro|wser> fr|
|000023f0| 6f 6d 20 73 75 70 65 72 | 63 6c 61 73 73 0a 3c 58 |om super|class.<X|
|00002400| 4d 5f 4c 49 53 54 5f 57 | 49 44 47 45 54 5f 43 4c |M_LIST_W|IDGET_CL|
|00002410| 41 53 53 3e 3a 0a 0a 09 | 28 73 65 74 71 20 4c 69 |ASS>:...|(setq Li|
|00002420| 73 74 5f 42 72 6f 77 73 | 65 72 20 0a 09 09 28 73 |st_Brows|er ...(s|
|00002430| 65 6e 64 20 43 6c 61 73 | 73 20 3a 4e 45 57 09 09 |end Clas|s :NEW..|
|00002440| 3b 63 72 65 61 74 65 20 | 61 20 63 6c 61 73 73 20 |;create |a class |
|00002450| 69 6e 73 74 0a 09 09 09 | 27 28 69 74 65 6d 73 29 |inst....|'(items)|
|00002460| 09 09 3b 6e 65 77 20 69 | 6e 73 74 61 6e 63 65 20 |..;new i|nstance |
|00002470| 76 61 72 73 0a 09 09 09 | 27 28 29 09 09 09 3b 6e |vars....|'()...;n|
|00002480| 6f 20 63 6c 61 73 73 20 | 76 61 72 73 0a 09 09 09 |o class |vars....|
|00002490| 58 4d 5f 4c 49 53 54 5f | 57 49 44 47 45 54 5f 43 |XM_LIST_|WIDGET_C|
|000024a0| 4c 41 53 53 29 29 09 3b | 73 75 70 65 72 63 6c 61 |LASS)).;|supercla|
|000024b0| 73 73 0a 0a 53 6f 20 6e | 6f 77 20 61 6c 6c 20 69 |ss..So n|ow all i|
|000024c0| 6e 73 74 61 6e 63 65 73 | 20 6f 66 20 3c 4c 69 73 |nstances| of <Lis|
|000024d0| 74 5f 42 72 6f 77 73 65 | 72 3e 20 77 69 6c 6c 20 |t_Browse|r> will |
|000024e0| 63 6f 6e 74 61 69 6e 20 | 61 6e 20 69 6e 73 74 61 |contain |an insta|
|000024f0| 6e 63 65 20 76 61 72 69 | 61 62 6c 65 0a 3c 69 74 |nce vari|able.<it|
|00002500| 65 6d 73 3e 20 61 6e 64 | 20 77 69 6c 6c 20 72 65 |ems> and| will re|
|00002510| 73 70 6f 6e 64 20 74 6f | 20 61 6c 6c 20 74 68 65 |spond to| all the|
|00002520| 20 6d 65 73 73 61 67 65 | 73 20 75 6e 64 65 72 73 | message|s unders|
|00002530| 74 6f 6f 64 20 62 79 20 | 74 68 65 0a 58 4d 5f 4c |tood by |the.XM_L|
|00002540| 49 53 54 5f 57 49 44 47 | 45 54 5f 43 4c 41 53 53 |IST_WIDG|ET_CLASS|
|00002550| 2e 20 57 65 20 77 61 6e | 74 20 6f 75 72 20 6c 69 |. We wan|t our li|
|00002560| 73 74 20 62 72 6f 77 73 | 65 72 20 74 6f 20 62 65 |st brows|er to be|
|00002570| 68 61 76 65 20 61 73 20 | 64 65 73 63 72 69 62 65 |have as |describe|
|00002580| 64 0a 61 62 6f 76 65 2c | 20 73 6f 20 77 65 20 64 |d.above,| so we d|
|00002590| 65 66 69 6e 65 20 61 6e | 20 3a 49 53 4e 45 57 20 |efine an| :ISNEW |
|000025a0| 6d 65 74 68 6f 64 20 74 | 6f 20 69 6e 69 74 69 61 |method t|o initia|
|000025b0| 6c 69 7a 65 20 69 6e 73 | 74 61 6e 63 65 20 76 61 |lize ins|tance va|
|000025c0| 72 69 61 62 6c 65 0a 3c | 69 74 65 6d 73 3e 20 74 |riable.<|items> t|
|000025d0| 6f 20 74 68 65 20 6c 69 | 73 74 20 6f 66 20 61 72 |o the li|st of ar|
|000025e0| 62 69 74 72 61 72 79 20 | 6f 62 6a 65 63 74 73 20 |bitrary |objects |
|000025f0| 74 6f 20 62 65 20 64 69 | 73 70 6c 61 79 65 64 2e |to be di|splayed.|
|00002600| 20 20 3c 69 74 65 6d 73 | 3e 20 67 65 74 73 0a 69 | <items|> gets.i|
|00002610| 6e 69 74 69 61 6c 69 7a | 65 64 20 74 6f 20 61 6e |nitializ|ed to an|
|00002620| 20 61 72 72 61 79 20 6f | 66 20 6f 62 6a 65 63 74 | array o|f object|
|00002630| 73 2c 20 74 68 65 20 6c | 69 73 74 20 77 69 64 67 |s, the l|ist widg|
|00002640| 65 74 20 69 73 20 63 72 | 65 61 74 65 64 2c 20 61 |et is cr|eated, a|
|00002650| 6e 64 20 61 0a 58 6d 4e | 64 65 66 61 75 6c 74 41 |nd a.XmN|defaultA|
|00002660| 63 74 69 6f 6e 43 61 6c | 6c 62 61 63 6b 20 69 73 |ctionCal|lback is|
|00002670| 20 73 65 74 75 70 20 73 | 6f 20 74 68 61 74 20 61 | setup s|o that a|
|00002680| 20 64 6f 75 62 6c 65 20 | 63 6c 69 63 6b 20 77 69 | double |click wi|
|00002690| 6c 6c 20 73 65 6e 64 20 | 74 68 65 0a 6d 65 73 73 |ll send |the.mess|
|000026a0| 61 67 65 20 3a 44 45 46 | 41 55 4c 54 5f 41 43 54 |age :DEF|AULT_ACT|
|000026b0| 49 4f 4e 20 74 6f 20 74 | 68 65 20 62 72 6f 77 73 |ION to t|he brows|
|000026c0| 65 64 20 69 74 65 6d 3a | 0a 0a 09 3b 3b 20 28 73 |ed item:|...;; (s|
|000026d0| 65 6e 64 20 4c 69 73 74 | 5f 42 72 6f 77 73 65 72 |end List|_Browser|
|000026e0| 20 3a 6e 65 77 20 3c 69 | 74 65 6d 73 5f 6c 69 73 | :new <i|tems_lis|
|000026f0| 74 3e 20 3c 61 72 67 73 | 2d 66 6f 72 2d 74 68 65 |t> <args|-for-the|
|00002700| 2d 6c 69 73 74 2d 77 69 | 64 67 65 74 3e 29 0a 09 |-list-wi|dget>)..|
|00002710| 3b 3b 20 3c 69 74 65 6d | 73 5f 6c 69 73 74 3e 20 |;; <item|s_list> |
|00002720| 69 73 20 61 20 6c 69 73 | 74 20 6f 66 20 42 52 4f |is a lis|t of BRO|
|00002730| 57 53 45 52 5f 4f 42 4a | 45 43 54 73 20 61 73 20 |WSER_OBJ|ECTs as |
|00002740| 64 65 73 63 72 69 62 65 | 64 20 61 62 6f 76 65 2e |describe|d above.|
|00002750| 0a 09 3b 3b 20 3c 61 72 | 67 73 2d 66 6f 72 2d 74 |..;; <ar|gs-for-t|
|00002760| 68 65 2d 6c 69 73 74 2d | 77 69 64 67 65 74 3e 20 |he-list-|widget> |
|00002770| 2d 2d 20 74 68 65 73 65 | 20 61 72 65 20 74 68 65 |-- these| are the|
|00002780| 20 61 72 67 75 6d 65 6e | 74 73 20 74 68 61 74 0a | argumen|ts that.|
|00002790| 09 3b 3b 20 20 20 20 20 | 20 20 77 69 6c 6c 20 62 |.;; | will b|
|000027a0| 65 20 70 61 73 73 65 64 | 20 6f 6e 20 74 6f 20 74 |e passed| on to t|
|000027b0| 68 65 20 6c 69 73 74 20 | 77 69 64 67 65 74 0a 09 |he list |widget..|
|000027c0| 3b 3b 0a 09 28 73 65 6e | 64 20 4c 69 73 74 5f 42 |;;..(sen|d List_B|
|000027d0| 72 6f 77 73 65 72 20 3a | 61 6e 73 77 65 72 20 3a |rowser :|answer :|
|000027e0| 69 73 6e 65 77 20 27 28 | 69 74 65 6d 73 5f 6c 69 |isnew '(|items_li|
|000027f0| 73 74 20 26 72 65 73 74 | 20 61 72 67 73 29 0a 09 |st &rest| args)..|
|00002800| 20 20 20 20 20 20 27 28 | 0a 09 09 28 6c 65 74 2a | '(|...(let*|
|00002810| 20 28 0a 09 09 20 20 20 | 20 20 20 20 28 69 74 65 | (... | (ite|
|00002820| 6d 73 5f 65 6e 64 5f 69 | 64 78 20 28 6c 65 6e 67 |ms_end_i|dx (leng|
|00002830| 74 68 20 69 74 65 6d 73 | 5f 6c 69 73 74 29 29 0a |th items|_list)).|
|00002840| 09 09 20 20 20 20 20 20 | 20 28 64 69 73 70 6c 61 |.. | (displa|
|00002850| 79 5f 69 74 65 6d 73 20 | 28 6d 61 6b 65 2d 61 72 |y_items |(make-ar|
|00002860| 72 61 79 20 69 74 65 6d | 73 5f 65 6e 64 5f 69 64 |ray item|s_end_id|
|00002870| 78 29 29 29 0a 0a 09 09 | 20 20 3b 3b 20 69 6e 69 |x)))....| ;; ini|
|00002880| 74 69 61 6c 69 7a 65 20 | 74 68 65 20 27 69 74 65 |tialize |the 'ite|
|00002890| 6d 73 27 20 69 6e 73 74 | 61 6e 63 65 20 76 61 72 |ms' inst|ance var|
|000028a0| 69 61 62 6c 65 20 73 6f | 20 74 68 61 74 20 69 74 |iable so| that it|
|000028b0| 0a 09 09 20 20 3b 3b 20 | 68 6f 6c 64 73 20 61 6c |... ;; |holds al|
|000028c0| 6c 20 74 68 65 20 42 52 | 4f 57 53 45 52 5f 4f 42 |l the BR|OWSER_OB|
|000028d0| 4a 45 43 54 73 20 70 61 | 73 73 65 64 20 69 6e 20 |JECTs pa|ssed in |
|000028e0| 3c 69 74 65 6d 73 5f 6c | 69 73 74 3e 0a 09 09 20 |<items_l|ist>... |
|000028f0| 20 28 73 65 74 71 20 69 | 74 65 6d 73 20 28 6d 61 | (setq i|tems (ma|
|00002900| 6b 65 2d 61 72 72 61 79 | 20 69 74 65 6d 73 5f 65 |ke-array| items_e|
|00002910| 6e 64 5f 69 64 78 29 29 | 20 3b 63 72 65 61 74 65 |nd_idx))| ;create|
|00002920| 20 74 68 65 20 61 72 72 | 61 79 0a 09 09 20 20 28 | the arr|ay... (|
|00002930| 64 6f 20 28 20 20 20 20 | 20 20 20 20 20 20 20 20 |do ( | |
|00002940| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 3b 63 6f | | ;co|
|00002950| 70 79 20 65 6c 74 73 20 | 66 72 6f 6d 20 6c 69 73 |py elts |from lis|
|00002960| 74 20 74 6f 20 61 72 72 | 61 79 0a 09 09 20 20 20 |t to arr|ay... |
|00002970| 20 20 20 20 28 69 20 20 | 20 20 30 20 20 20 20 20 | (i | 0 |
|00002980| 20 20 20 20 20 28 31 2b | 20 69 29 29 0a 09 09 20 | (1+| i))... |
|00002990| 20 20 20 20 20 20 28 65 | 6c 74 73 20 69 74 65 6d | (e|lts item|
|000029a0| 73 5f 6c 69 73 74 20 28 | 63 64 72 20 65 6c 74 73 |s_list (|cdr elts|
|000029b0| 29 29 29 0a 09 09 20 20 | 20 20 20 20 3b 3b 20 6c |)))... | ;; l|
|000029c0| 6f 6f 70 20 74 69 6c 6c | 20 6e 6f 20 6d 6f 72 65 |oop till| no more|
|000029d0| 20 65 6c 74 73 0a 09 09 | 20 20 20 20 20 20 28 28 | elts...| ((|
|000029e0| 6e 75 6c 6c 20 65 6c 74 | 73 29 29 0a 09 09 20 20 |null elt|s))... |
|000029f0| 20 20 20 20 3b 3b 20 6c | 6f 6f 70 20 62 6f 64 79 | ;; l|oop body|
|00002a00| 0a 09 09 20 20 20 20 20 | 20 28 73 65 74 66 20 28 |... | (setf (|
|00002a10| 61 72 65 66 20 69 74 65 | 6d 73 20 69 29 20 28 63 |aref ite|ms i) (c|
|00002a20| 61 72 20 65 6c 74 73 29 | 29 0a 09 09 20 20 20 20 |ar elts)|)... |
|00002a30| 20 20 28 73 65 74 66 20 | 28 61 72 65 66 20 64 69 | (setf |(aref di|
|00002a40| 73 70 6c 61 79 5f 69 74 | 65 6d 73 20 69 29 20 0a |splay_it|ems i) .|
|00002a50| 09 09 09 20 20 20 20 28 | 73 65 6e 64 20 28 63 61 |... (|send (ca|
|00002a60| 72 20 65 6c 74 73 29 20 | 3a 64 69 73 70 6c 61 79 |r elts) |:display|
|00002a70| 5f 73 74 72 69 6e 67 29 | 29 0a 09 09 20 20 20 20 |_string)|)... |
|00002a80| 20 20 29 0a 0a 09 09 20 | 20 3b 3b 20 69 6e 69 74 | ).... | ;; init|
|00002a90| 69 61 6c 69 7a 65 20 74 | 68 65 20 77 69 64 67 65 |ialize t|he widge|
|00002aa0| 74 2c 20 70 61 73 73 69 | 6e 67 20 69 6e 20 74 68 |t, passi|ng in th|
|00002ab0| 65 20 62 72 6f 77 73 65 | 72 20 69 74 65 6d 73 2e |e browse|r items.|
|00002ac0| 0a 09 09 20 20 28 61 70 | 70 6c 79 20 27 73 65 6e |... (ap|ply 'sen|
|00002ad0| 64 2d 73 75 70 65 72 20 | 60 28 3a 69 73 6e 65 77 |d-super |`(:isnew|
|00002ae0| 0a 09 09 09 09 20 20 20 | 20 20 20 20 2c 40 61 72 |..... | ,@ar|
|00002af0| 67 73 0a 09 09 09 09 20 | 20 20 20 20 20 20 3a 78 |gs..... | :x|
|00002b00| 6d 6e 5f 73 65 6c 65 63 | 74 69 6f 6e 5f 70 6f 6c |mn_selec|tion_pol|
|00002b10| 69 63 79 20 3a 62 72 6f | 77 73 65 5f 73 65 6c 65 |icy :bro|wse_sele|
|00002b20| 63 74 0a 09 09 09 09 20 | 20 20 20 20 20 20 3a 78 |ct..... | :x|
|00002b30| 6d 6e 5f 69 74 65 6d 73 | 20 2c 64 69 73 70 6c 61 |mn_items| ,displa|
|00002b40| 79 5f 69 74 65 6d 73 0a | 09 09 09 09 20 20 20 20 |y_items.|.... |
|00002b50| 20 20 20 3a 78 6d 6e 5f | 69 74 65 6d 5f 63 6f 75 | :xmn_|item_cou|
|00002b60| 6e 74 20 2c 69 74 65 6d | 73 5f 65 6e 64 5f 69 64 |nt ,item|s_end_id|
|00002b70| 78 0a 09 09 09 09 20 20 | 20 20 20 20 20 29 29 0a |x..... | )).|
|00002b80| 09 09 20 20 29 0a 0a 09 | 09 3b 3b 20 73 65 74 20 |.. )...|.;; set |
|00002b90| 75 70 20 61 20 63 61 6c | 6c 62 61 63 6b 20 6f 6e |up a cal|lback on|
|00002ba0| 20 74 68 65 20 6c 69 73 | 74 20 77 69 64 67 65 74 | the lis|t widget|
|00002bb0| 20 69 6e 69 74 69 61 6c | 69 7a 65 64 20 61 62 6f | initial|ized abo|
|00002bc0| 76 65 20 73 75 63 68 0a | 09 09 3b 3b 20 74 68 61 |ve such.|..;; tha|
|00002bd0| 74 20 61 20 64 6f 75 62 | 6c 65 20 63 6c 69 63 6b |t a doub|le click|
|00002be0| 20 6f 6e 20 74 68 65 20 | 62 72 6f 77 73 65 72 2d | on the |browser-|
|00002bf0| 69 74 65 6d 20 77 69 6c | 6c 20 73 65 6e 64 20 74 |item wil|l send t|
|00002c00| 68 65 0a 09 09 3b 3b 20 | 6d 65 73 73 61 67 65 20 |he...;; |message |
|00002c10| 3a 64 65 66 61 75 6c 74 | 5f 61 63 74 69 6f 6e 20 |:default|_action |
|00002c20| 74 6f 20 74 68 65 20 42 | 52 4f 57 53 45 52 5f 4f |to the B|ROWSER_O|
|00002c30| 42 4a 45 43 54 2e 0a 09 | 09 28 73 65 6e 64 2d 73 |BJECT...|.(send-s|
|00002c40| 75 70 65 72 20 3a 61 64 | 64 5f 63 61 6c 6c 62 61 |uper :ad|d_callba|
|00002c50| 63 6b 20 3a 78 6d 6e 5f | 64 65 66 61 75 6c 74 5f |ck :xmn_|default_|
|00002c60| 61 63 74 69 6f 6e 5f 63 | 61 6c 6c 62 61 63 6b 0a |action_c|allback.|
|00002c70| 09 09 09 20 20 20 20 27 | 28 63 61 6c 6c 62 61 63 |... '|(callbac|
|00002c80| 6b 5f 69 74 65 6d 5f 70 | 6f 73 69 74 69 6f 6e 29 |k_item_p|osition)|
|00002c90| 0a 09 09 09 20 20 20 20 | 27 28 28 73 65 6e 64 20 |.... |'((send |
|00002ca0| 28 61 72 65 66 20 69 74 | 65 6d 73 20 28 31 2d 20 |(aref it|ems (1- |
|00002cb0| 63 61 6c 6c 62 61 63 6b | 5f 69 74 65 6d 5f 70 6f |callback|_item_po|
|00002cc0| 73 69 74 69 6f 6e 29 29 | 0a 09 09 09 09 20 20 20 |sition))|..... |
|00002cd0| 20 3a 64 65 66 61 75 6c | 74 5f 61 63 74 69 6f 6e | :defaul|t_action|
|00002ce0| 29 29 0a 09 09 09 20 20 | 20 20 29 0a 09 09 29 0a |)).... | )...).|
|00002cf0| 09 20 20 20 20 20 20 29 | 0a 0a 0a 49 6e 20 74 68 |. )|...In th|
|00002d00| 65 20 61 62 6f 76 65 20 | 63 6f 64 65 2c 20 53 45 |e above |code, SE|
|00002d10| 4e 44 2d 53 55 50 45 52 | 20 77 6f 72 6b 73 20 6a |ND-SUPER| works j|
|00002d20| 75 73 74 20 6c 69 6b 65 | 20 73 65 6e 64 2c 20 65 |ust like| send, e|
|00002d30| 78 63 65 70 74 20 74 68 | 61 74 20 69 74 20 64 6f |xcept th|at it do|
|00002d40| 65 73 6e 27 74 0a 72 65 | 71 75 69 72 65 20 79 6f |esn't.re|quire yo|
|00002d50| 75 20 74 6f 20 67 69 76 | 65 20 69 74 20 74 68 65 |u to giv|e it the|
|00002d60| 20 6f 62 6a 65 63 74 20 | 74 6f 20 73 65 6e 64 20 | object |to send |
|00002d70| 74 68 65 20 6d 65 73 73 | 61 67 65 20 74 6f 2e 20 |the mess|age to. |
|00002d80| 20 49 6e 73 74 65 61 64 | 2c 20 69 74 0a 69 6d 70 | Instead|, it.imp|
|00002d90| 6c 69 63 69 74 6c 79 20 | 61 73 73 75 6d 65 73 20 |licitly |assumes |
|00002da0| 74 68 61 74 20 69 74 20 | 77 69 6c 6c 20 62 65 20 |that it |will be |
|00002db0| 63 61 6c 6c 65 64 20 66 | 72 6f 6d 20 77 69 74 68 |called f|rom with|
|00002dc0| 69 6e 20 61 20 6d 65 74 | 68 6f 64 2c 20 61 6e 64 |in a met|hod, and|
|00002dd0| 20 77 69 6c 6c 0a 61 75 | 74 6f 6d 61 74 69 63 61 | will.au|tomatica|
|00002de0| 6c 6c 79 20 73 65 6e 64 | 20 74 68 65 20 6d 65 73 |lly send| the mes|
|00002df0| 73 61 67 65 20 74 6f 20 | 61 20 73 75 70 65 72 63 |sage to |a superc|
|00002e00| 6c 61 73 73 20 6f 66 20 | 74 68 65 20 6f 62 6a 65 |lass of |the obje|
|00002e10| 63 74 27 73 20 63 6c 61 | 73 73 2e 20 20 54 68 65 |ct's cla|ss. The|
|00002e20| 0a 28 61 70 70 6c 79 20 | 27 73 65 6e 64 2d 73 75 |.(apply |'send-su|
|00002e30| 70 65 72 20 2e 2e 2e 29 | 20 66 6f 72 6d 20 69 73 |per ...)| form is|
|00002e40| 20 61 63 74 75 61 6c 6c | 79 20 63 61 6c 6c 69 6e | actuall|y callin|
|00002e50| 67 20 74 68 65 20 3a 49 | 53 4e 45 57 20 28 69 6e |g the :I|SNEW (in|
|00002e60| 73 74 61 6e 63 65 0a 69 | 6e 69 74 69 61 6c 69 7a |stance.i|nitializ|
|00002e70| 65 72 29 20 6d 65 74 68 | 6f 64 20 6f 6e 20 58 4d |er) meth|od on XM|
|00002e80| 5f 4c 49 53 54 5f 57 49 | 44 47 45 54 5f 43 4c 41 |_LIST_WI|DGET_CLA|
|00002e90| 53 53 2c 20 77 68 69 63 | 68 20 61 63 74 75 61 6c |SS, whic|h actual|
|00002ea0| 6c 79 20 63 72 65 61 74 | 65 73 20 74 68 65 0a 77 |ly creat|es the.w|
|00002eb0| 69 64 67 65 74 20 76 69 | 61 20 58 6d 43 72 65 61 |idget vi|a XmCrea|
|00002ec0| 74 65 4c 69 73 74 28 29 | 20 6f 72 20 58 6d 43 72 |teList()| or XmCr|
|00002ed0| 65 61 74 65 53 63 72 6f | 6c 6c 65 64 4c 69 73 74 |eateScro|lledList|
|00002ee0| 28 29 2e 20 54 68 65 20 | 41 50 50 4c 59 20 27 60 |(). The |APPLY '`|
|00002ef0| 27 0a 28 42 41 43 4b 51 | 55 4f 54 45 29 20 61 6e |'.(BACKQ|UOTE) an|
|00002f00| 64 20 27 26 72 65 73 74 | 20 61 72 67 73 27 20 28 |d '&rest| args' (|
|00002f10| 4c 41 4d 42 44 41 20 4c | 49 53 54 29 20 66 65 61 |LAMBDA L|IST) fea|
|00002f20| 74 75 72 65 73 20 6f 66 | 20 4c 69 73 70 20 61 6c |tures of| Lisp al|
|00002f30| 6c 6f 77 20 75 73 20 74 | 6f 0a 73 70 6c 69 63 65 |low us t|o.splice|
|00002f40| 20 69 6e 20 74 68 65 20 | 61 72 67 75 6d 65 6e 74 | in the |argument|
|00002f50| 20 6c 69 73 74 20 70 61 | 73 73 65 64 20 74 6f 20 | list pa|ssed to |
|00002f60| 74 68 65 20 69 6e 73 74 | 61 6e 63 65 20 6f 66 20 |the inst|ance of |
|00002f70| 4c 69 73 74 5f 42 72 6f | 77 73 65 72 20 69 6e 74 |List_Bro|wser int|
|00002f80| 6f 20 74 68 65 0a 66 75 | 6e 63 74 69 6f 6e 20 74 |o the.fu|nction t|
|00002f90| 68 61 74 20 61 63 74 75 | 61 6c 6c 79 20 63 72 65 |hat actu|ally cre|
|00002fa0| 61 74 65 73 20 74 68 65 | 20 77 69 64 67 65 74 2e |ates the| widget.|
|00002fb0| 20 46 69 6e 61 6c 6c 79 | 2c 20 6d 65 74 68 6f 64 | Finally|, method|
|00002fc0| 20 3a 61 64 64 5f 63 61 | 6c 6c 62 61 63 6b 20 69 | :add_ca|llback i|
|00002fd0| 73 0a 74 68 65 20 57 49 | 4e 54 45 52 50 20 65 71 |s.the WI|NTERP eq|
|00002fe0| 75 69 76 61 6c 65 6e 74 | 20 6f 66 20 58 74 41 64 |uivalent| of XtAd|
|00002ff0| 64 43 61 6c 6c 62 61 63 | 6b 28 29 2e 20 53 65 65 |dCallbac|k(). See|
|00003000| 20 74 68 65 20 64 6f 63 | 75 6d 65 6e 74 61 74 69 | the doc|umentati|
|00003010| 6f 6e 20 6f 6e 20 6d 65 | 74 68 6f 64 73 0a 6f 6e |on on me|thods.on|
|00003020| 20 57 49 44 47 45 54 5f | 43 4c 41 53 53 20 66 6f | WIDGET_|CLASS fo|
|00003030| 72 20 6d 6f 72 65 20 64 | 65 74 61 69 6c 73 2e 0a |r more d|etails..|
|00003040| 0a 54 68 65 20 4d 6f 74 | 69 66 20 4c 69 73 74 20 |.The Mot|if List |
|00003050| 77 69 64 67 65 74 20 61 | 6c 73 6f 20 64 65 66 69 |widget a|lso defi|
|00003060| 6e 65 73 20 61 20 6e 75 | 6d 62 65 72 20 6f 66 20 |nes a nu|mber of |
|00003070| 22 6d 65 74 68 6f 64 73 | 22 20 69 6d 70 6c 65 6d |"methods|" implem|
|00003080| 65 6e 74 65 64 20 61 73 | 20 43 0a 72 6f 75 74 69 |ented as| C.routi|
|00003090| 6e 65 73 20 73 75 63 68 | 20 61 73 20 58 6d 4c 69 |nes such| as XmLi|
|000030a0| 73 74 41 64 64 49 74 65 | 6d 28 29 2c 20 58 6d 4c |stAddIte|m(), XmL|
|000030b0| 69 73 74 41 64 64 49 74 | 65 6d 55 6e 73 65 6c 65 |istAddIt|emUnsele|
|000030c0| 63 74 65 64 28 29 2c 0a | 58 6d 4c 69 73 74 44 65 |cted(),.|XmListDe|
|000030d0| 6c 65 74 65 49 74 65 6d | 28 29 2c 20 61 6e 64 20 |leteItem|(), and |
|000030e0| 58 6d 4c 69 73 74 44 65 | 6c 65 74 65 50 6f 73 28 |XmListDe|letePos(|
|000030f0| 29 2e 20 49 6e 20 57 49 | 4e 54 45 52 50 2c 20 77 |). In WI|NTERP, w|
|00003100| 65 20 64 65 66 69 6e 65 | 20 74 68 65 73 65 20 61 |e define| these a|
|00003110| 73 0a 6d 65 74 68 6f 64 | 73 20 3a 41 44 44 5f 49 |s.method|s :ADD_I|
|00003120| 54 45 4d 2c 20 3a 41 44 | 44 5f 49 54 45 4d 5f 55 |TEM, :AD|D_ITEM_U|
|00003130| 4e 53 45 4c 45 43 54 45 | 44 2c 20 3a 44 45 4c 45 |NSELECTE|D, :DELE|
|00003140| 54 45 5f 49 54 45 4d 2c | 20 61 6e 64 20 3a 44 45 |TE_ITEM,| and :DE|
|00003150| 4c 45 54 45 5f 50 4f 53 | 0a 72 65 73 70 65 63 74 |LETE_POS|.respect|
|00003160| 69 76 65 6c 79 2e 20 53 | 69 6e 63 65 20 74 68 65 |ively. S|ince the|
|00003170| 73 65 20 6d 65 74 68 6f | 64 73 20 6d 6f 64 69 66 |se metho|ds modif|
|00003180| 79 20 74 68 65 20 63 6f | 6c 6c 65 63 74 69 6f 6e |y the co|llection|
|00003190| 20 6f 66 20 6f 62 6a 65 | 63 74 73 0a 72 65 70 72 | of obje|cts.repr|
|000031a0| 65 73 65 6e 74 65 64 20 | 62 79 20 74 68 65 20 6c |esented |by the l|
|000031b0| 69 73 74 20 77 69 64 67 | 65 74 2c 20 77 65 20 6d |ist widg|et, we m|
|000031c0| 75 73 74 20 75 70 64 61 | 74 65 20 74 68 65 20 69 |ust upda|te the i|
|000031d0| 6e 74 65 72 6e 61 6c 20 | 61 72 72 61 79 20 6f 66 |nternal |array of|
|000031e0| 0a 6f 62 6a 65 63 74 73 | 20 3c 69 74 65 6d 73 3e |.objects| <items>|
|000031f0| 20 74 6f 20 63 6f 72 72 | 65 73 70 6f 6e 64 20 77 | to corr|espond w|
|00003200| 69 74 68 20 74 68 65 20 | 69 74 65 6d 73 20 64 69 |ith the |items di|
|00003210| 73 70 6c 61 79 65 64 2e | 20 57 65 20 64 6f 20 74 |splayed.| We do t|
|00003220| 68 69 73 20 62 79 0a 69 | 6e 74 65 72 63 65 70 74 |his by.i|ntercept|
|00003230| 69 6e 67 20 74 68 6f 73 | 65 20 6d 65 73 73 61 67 |ing thos|e messag|
|00003240| 65 73 20 74 6f 20 74 68 | 65 20 73 75 70 65 72 63 |es to th|e superc|
|00003250| 6c 61 73 73 20 6f 66 20 | 63 6c 61 73 73 20 3c 4c |lass of |class <L|
|00003260| 69 73 74 5f 42 72 6f 77 | 73 65 72 3e 20 61 6e 64 |ist_Brow|ser> and|
|00003270| 0a 68 61 6e 64 6c 65 20 | 74 68 65 6d 20 69 6e 20 |.handle |them in |
|00003280| 3c 4c 69 73 74 5f 42 72 | 6f 77 73 65 72 3e 20 73 |<List_Br|owser> s|
|00003290| 6f 20 61 73 20 74 6f 20 | 75 70 64 61 74 65 20 74 |o as to |update t|
|000032a0| 68 65 20 61 70 70 72 6f | 70 72 69 61 74 65 20 64 |he appro|priate d|
|000032b0| 61 74 61 3a 0a 0a 09 28 | 73 65 6e 64 20 4c 69 73 |ata:...(|send Lis|
|000032c0| 74 5f 42 72 6f 77 73 65 | 72 20 3a 61 6e 73 77 65 |t_Browse|r :answe|
|000032d0| 72 20 3a 41 44 44 5f 49 | 54 45 4d 20 27 28 69 74 |r :ADD_I|TEM '(it|
|000032e0| 65 6d 20 70 6f 73 69 74 | 69 6f 6e 29 0a 09 20 20 |em posit|ion).. |
|000032f0| 20 20 20 20 27 28 0a 09 | 09 28 73 65 74 71 20 69 | '(..|.(setq i|
|00003300| 74 65 6d 73 20 28 61 72 | 72 61 79 2d 69 6e 73 65 |tems (ar|ray-inse|
|00003310| 72 74 2d 70 6f 73 20 69 | 74 65 6d 73 20 28 31 2d |rt-pos i|tems (1-|
|00003320| 20 70 6f 73 69 74 69 6f | 6e 29 20 69 74 65 6d 29 | positio|n) item)|
|00003330| 29 0a 09 09 28 73 65 6e | 64 2d 73 75 70 65 72 20 |)...(sen|d-super |
|00003340| 3a 61 64 64 5f 69 74 65 | 6d 20 0a 09 09 09 20 20 |:add_ite|m .... |
|00003350| 20 20 28 73 65 6e 64 20 | 69 74 65 6d 20 3a 64 69 | (send |item :di|
|00003360| 73 70 6c 61 79 5f 73 74 | 72 69 6e 67 29 20 0a 09 |splay_st|ring) ..|
|00003370| 09 09 20 20 20 20 70 6f | 73 69 74 69 6f 6e 29 0a |.. po|sition).|
|00003380| 09 09 29 0a 09 20 20 20 | 20 20 20 29 0a 0a 09 28 |..).. | )...(|
|00003390| 73 65 6e 64 20 4c 69 73 | 74 5f 42 72 6f 77 73 65 |send Lis|t_Browse|
|000033a0| 72 20 3a 61 6e 73 77 65 | 72 20 3a 41 44 44 5f 49 |r :answe|r :ADD_I|
|000033b0| 54 45 4d 5f 55 4e 53 45 | 4c 45 43 54 45 44 20 27 |TEM_UNSE|LECTED '|
|000033c0| 28 69 74 65 6d 20 70 6f | 73 69 74 69 6f 6e 29 0a |(item po|sition).|
|000033d0| 09 20 20 20 20 20 20 27 | 28 0a 09 09 28 73 65 74 |. '|(...(set|
|000033e0| 71 20 69 74 65 6d 73 20 | 28 61 72 72 61 79 2d 69 |q items |(array-i|
|000033f0| 6e 73 65 72 74 2d 70 6f | 73 20 69 74 65 6d 73 20 |nsert-po|s items |
|00003400| 28 31 2d 20 70 6f 73 69 | 74 69 6f 6e 29 20 69 74 |(1- posi|tion) it|
|00003410| 65 6d 29 29 0a 09 09 28 | 73 65 6e 64 2d 73 75 70 |em))...(|send-sup|
|00003420| 65 72 20 3a 61 64 64 5f | 69 74 65 6d 5f 75 6e 73 |er :add_|item_uns|
|00003430| 65 6c 65 63 74 65 64 20 | 0a 09 09 09 20 20 20 20 |elected |.... |
|00003440| 28 73 65 6e 64 20 69 74 | 65 6d 20 3a 64 69 73 70 |(send it|em :disp|
|00003450| 6c 61 79 5f 73 74 72 69 | 6e 67 29 0a 09 09 09 20 |lay_stri|ng).... |
|00003460| 20 20 20 70 6f 73 69 74 | 69 6f 6e 29 0a 09 09 29 | posit|ion)...)|
|00003470| 0a 09 20 20 20 20 20 20 | 29 0a 0a 09 28 73 65 6e |.. |)...(sen|
|00003480| 64 20 4c 69 73 74 5f 42 | 72 6f 77 73 65 72 20 3a |d List_B|rowser :|
|00003490| 61 6e 73 77 65 72 20 3a | 44 45 4c 45 54 45 5f 49 |answer :|DELETE_I|
|000034a0| 54 45 4d 20 27 28 69 74 | 65 6d 29 0a 09 20 20 20 |TEM '(it|em).. |
|000034b0| 20 20 20 27 28 0a 09 09 | 3b 3b 20 74 68 69 73 20 | '(...|;; this |
|000034c0| 69 73 20 74 6f 6f 20 6c | 61 6d 65 20 74 6f 20 69 |is too l|ame to i|
|000034d0| 6d 70 6c 65 6d 65 6e 74 | 2e 2e 2e 20 72 65 71 75 |mplement|... requ|
|000034e0| 69 72 65 73 20 74 68 61 | 74 20 77 65 20 63 6f 6d |ires tha|t we com|
|000034f0| 70 61 72 65 0a 09 09 3b | 3b 20 69 74 65 6d 20 77 |pare...;|; item w|
|00003500| 69 74 68 20 74 68 65 20 | 72 65 73 75 6c 74 20 6f |ith the |result o|
|00003510| 66 20 3a 64 69 73 70 6c | 61 79 5f 73 74 72 69 6e |f :displ|ay_strin|
|00003520| 67 20 64 6f 6e 65 20 6f | 6e 20 65 76 65 72 79 20 |g done o|n every |
|00003530| 65 6c 74 0a 09 09 3b 3b | 20 6f 66 20 69 76 61 72 |elt...;;| of ivar|
|00003540| 20 27 69 74 65 6d 73 27 | 0a 09 09 28 65 72 72 6f | 'items'|...(erro|
|00003550| 72 20 22 4d 65 73 73 61 | 67 65 20 3a 44 45 4c 45 |r "Messa|ge :DELE|
|00003560| 54 45 5f 49 54 45 4d 20 | 6e 6f 74 20 73 75 70 70 |TE_ITEM |not supp|
|00003570| 6f 72 74 65 64 20 69 6e | 20 4c 69 73 74 5f 42 72 |orted in| List_Br|
|00003580| 6f 77 73 65 72 22 29 0a | 09 09 29 0a 09 20 20 20 |owser").|..).. |
|00003590| 20 20 20 29 0a 0a 09 28 | 73 65 6e 64 20 4c 69 73 | )...(|send Lis|
|000035a0| 74 5f 42 72 6f 77 73 65 | 72 20 3a 61 6e 73 77 65 |t_Browse|r :answe|
|000035b0| 72 20 3a 44 45 4c 45 54 | 45 5f 50 4f 53 20 27 28 |r :DELET|E_POS '(|
|000035c0| 70 6f 73 69 74 69 6f 6e | 29 0a 09 20 20 20 20 20 |position|).. |
|000035d0| 20 27 28 0a 09 09 28 73 | 65 74 71 20 69 74 65 6d | '(...(s|etq item|
|000035e0| 73 20 28 61 72 72 61 79 | 2d 64 65 6c 65 74 65 2d |s (array|-delete-|
|000035f0| 70 6f 73 20 69 74 65 6d | 73 20 28 31 2d 20 70 6f |pos item|s (1- po|
|00003600| 73 69 74 69 6f 6e 29 29 | 29 0a 09 09 28 73 65 6e |sition))|)...(sen|
|00003610| 64 2d 73 75 70 65 72 20 | 3a 64 65 6c 65 74 65 5f |d-super |:delete_|
|00003620| 70 6f 73 20 70 6f 73 69 | 74 69 6f 6e 29 0a 09 20 |pos posi|tion).. |
|00003630| 20 20 20 20 20 20 29 0a | 09 20 20 20 20 20 29 0a | ).|. ).|
|00003640| 0a 54 6f 20 73 65 65 20 | 68 6f 77 20 74 68 69 73 |.To see |how this|
|00003650| 20 73 75 62 63 6c 61 73 | 73 65 64 20 6c 69 73 74 | subclas|sed list|
|00003660| 20 62 72 6f 77 73 65 72 | 20 69 73 20 75 73 65 64 | browser| is used|
|00003670| 2c 20 61 6e 64 20 61 6c | 73 6f 20 74 6f 20 73 65 |, and al|so to se|
|00003680| 65 20 68 6f 77 20 6f 6e | 65 0a 6d 69 67 68 74 20 |e how on|e.might |
|00003690| 77 72 69 74 65 20 61 20 | 73 61 6d 70 6c 65 20 61 |write a |sample a|
|000036a0| 70 70 6c 69 63 61 74 69 | 6f 6e 20 69 6e 20 57 49 |pplicati|on in WI|
|000036b0| 4e 54 45 52 50 20 75 73 | 69 6e 67 20 74 68 65 20 |NTERP us|ing the |
|000036c0| 6f 62 6a 65 63 74 20 6f | 72 69 65 6e 74 65 64 0a |object o|riented.|
|000036d0| 66 65 61 74 75 72 65 73 | 20 6f 66 20 58 4c 49 53 |features| of XLIS|
|000036e0| 50 2c 20 73 65 65 20 2e | 2f 77 69 6e 74 65 72 70 |P, see .|/winterp|
|000036f0| 2f 65 78 61 6d 70 6c 65 | 73 2f 67 72 65 70 2d 62 |/example|s/grep-b|
|00003700| 72 2e 6c 73 70 2e 20 20 | 54 68 61 74 20 66 69 6c |r.lsp. |That fil|
|00003710| 65 0a 69 6d 70 6c 65 6d | 65 6e 74 73 20 61 20 73 |e.implem|ents a s|
|00003720| 69 6d 70 6c 65 20 73 65 | 61 72 63 68 20 62 72 6f |imple se|arch bro|
|00003730| 77 73 65 72 20 62 61 73 | 65 64 20 6f 6e 20 74 68 |wser bas|ed on th|
|00003740| 65 20 55 4e 2a 58 20 63 | 6f 6d 6d 61 6e 64 20 27 |e UN*X c|ommand '|
|00003750| 67 72 65 70 27 2e 20 53 | 65 65 0a 61 6c 73 6f 20 |grep'. S|ee.also |
|00003760| 2e 2f 77 69 6e 74 65 72 | 70 2f 65 78 61 6d 70 6c |./winter|p/exampl|
|00003770| 65 73 2f 6d 61 69 6c 2d | 62 72 2e 6c 73 70 20 74 |es/mail-|br.lsp t|
|00003780| 6f 20 73 65 65 20 68 6f | 77 20 79 6f 75 20 63 61 |o see ho|w you ca|
|00003790| 6e 20 62 75 69 6c 64 20 | 61 20 73 69 6d 70 6c 65 |n build |a simple|
|000037a0| 0a 6d 68 2d 62 61 73 65 | 64 20 6d 61 69 6c 20 62 |.mh-base|d mail b|
|000037b0| 72 6f 77 73 65 72 2e 20 | 46 69 6e 61 6c 6c 79 2c |rowser. |Finally,|
|000037c0| 20 61 73 20 61 6e 6f 74 | 68 65 72 20 65 78 61 6d | as anot|her exam|
|000037d0| 70 6c 65 20 6f 66 20 73 | 75 62 63 6c 61 73 73 69 |ple of s|ubclassi|
|000037e0| 6e 67 20 4d 6f 74 69 66 | 0a 77 69 64 67 65 74 73 |ng Motif|.widgets|
|000037f0| 2c 20 73 65 65 20 2e 2f | 77 69 6e 74 65 72 70 2f |, see ./|winterp/|
|00003800| 65 78 61 6d 70 6c 65 73 | 2f 72 61 64 69 6f 62 6f |examples|/radiobo|
|00003810| 78 32 2e 6c 73 70 2e 0a | 2d 2d 2d 2d 2d 2d 2d 2d |x2.lsp..|--------|
|00003820| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003830| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003840| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003850| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003860| 2d 2d 2d 2d 2d 2d 2d 0a | 09 20 20 20 20 4e 69 65 |-------.|. Nie|
|00003870| 6c 73 20 4d 61 79 65 72 | 20 2d 2d 20 68 70 6c 61 |ls Mayer| -- hpla|
|00003880| 62 73 21 6d 61 79 65 72 | 20 2d 2d 20 6d 61 79 65 |bs!mayer| -- maye|
|00003890| 72 40 68 70 6c 61 62 73 | 2e 68 70 2e 63 6f 6d 0a |r@hplabs|.hp.com.|
|000038a0| 09 09 20 20 48 75 6d 61 | 6e 2d 43 6f 6d 70 75 74 |.. Huma|n-Comput|
|000038b0| 65 72 20 49 6e 74 65 72 | 61 63 74 69 6f 6e 20 44 |er Inter|action D|
|000038c0| 65 70 61 72 74 6d 65 6e | 74 0a 09 09 20 20 20 20 |epartmen|t... |
|000038d0| 20 20 20 48 65 77 6c 65 | 74 74 2d 50 61 63 6b 61 | Hewle|tt-Packa|
|000038e0| 72 64 20 4c 61 62 6f 72 | 61 74 6f 72 69 65 73 0a |rd Labor|atories.|
|000038f0| 09 09 09 20 20 20 20 20 | 20 50 61 6c 6f 20 41 6c |... | Palo Al|
|00003900| 74 6f 2c 20 43 41 2e 0a | 09 09 09 09 20 20 20 2a |to, CA..|.... *|
|00003910| 0a 0a 0a | |... | |
+--------+-------------------------+-------------------------+--------+--------+